improve expirer performance for sql backend

the model has been simplified which allows us to do bulk deletes
rather than looping through and deleting records individually.
this should improve performance significantly.

Change-Id: Ie99880438d7415d805a94d78df648082d5161417
Closes-Bug: #1289166
clean up event model

- fix defined relationships so they are properly backref
- fix trait_type __repr__ function to reference correct variable

Change-Id: Id606025ca3e91c6e9b7da597f8cc3181caf4d4b7
Closes-Bug: #1333399
Separate the console scripts

Having all the console scripts in one file means that we always pull
in all the dependencies. This presents a problem in downstream packaging,
for example, a distro alarm subpackage required pymongo dependencies
installed, even if not used.

This patch separates the console scripts into a 'cmd' module, the
way Nova does it. Eventlet monkey patching is done in the module's
__init__.py file.

Co-Authored-By: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
Closes-bug: #1317210
Change-Id: I83020b13670928fd0d3046d2d2a493b11fe81d61
Move log alarms driver code to alarm tree

This change move the alarms related code of log driver to
the alarm storage subtree.

Partial implements blueprint dedicated-alarm-database

Change-Id: I366dafefedc5944a1b1ee8358933228ee5a4cb21
Merge "improve expirer performance for sql backend"
Merge "Move log alarms driver code to alarm tree"
Merge "clean up event model"
Merge "Separate the console scripts"