'Log an event.
This is the function we use to capture interesting events that happen
across the system in one place, the ``events`` table.
:param c: a :py:class:`Postgres` or :py:class:`Cursor` instance
:param unicode type: an indicator of what type of event it is--either ``participant``,
``team`` or ``payday``
:param payload: an arbitrary JSON-serializable data structure; for ``participant`` type,
``id`` must be the id of the participant in question'

def add_event(self, c, type, payload):

    SQL = u'\n                                                INSERT    INTO    events    (type,    payload)\n                                                VALUES    (%s,    %s)\n                                '
    c.run(SQL, (type, psycopg2.extras.Json(payload)))
