Extract function load by name util into lib
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 processs 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.
Add future imports and encoding to new files
Fixup appevents import spacing
Merge pull request #1763 from jwalgran/topic/create-appevent

Add appevents application and model