Starting email functionality
Everything is now basically in place other than event logging. About ready to begin testing
Added an event model and checking of too many existing email events
Completed basic testing of email message handling.

* Created a management task to send an email
* Fixed multi-email problem by locking the threshold object while sending emails
* Fixed improper formation of message body
Several more tweaks and bugfixes. Probably ready for staging...

* Added a cleanup for old events
* Scheduled the worker down check
* Fixed bug in the rate limiting
* Did check that will prevent double sending on rapid queue flush
Added database migrations