Add appevents application and model

The AppEvent model provides storage for an arbitrary object keyed by a string event_type and stamped with a triggered_at datetime. A background process can then read these events and take some action (e.g. send an email notification).

The other fields on the model allow for locking items via database transactions so they can be handled by one and only one background process.