Initial support for storing enum values as links to a global enumerations table.

Uses foreign key constraints to make sure everything stays consistent.

Switched a couple of enums over to storing their values this way, with an eye
to having the JSON schemas pull their values from the enumerations table.
Split Enumeration class into its own file.
Add the ability to migrate all records from one enumeration to another
Added test cases for enumerations
New permission
Add a new 'dynamic_enum' schema type that looks to the JSONModel's enumeration source for its possible values.
MemoryLeak rejigging
Added controller for querying enumerations
Add two enum sources for querying enumerations:

  * One for the frontend, which uses its MemoryLeak module to manage caching of values

  * One for everything else, which just fetches them once
Add webhook listener for changed enumerations
Refactored the way enumerations are stored to turn enumerations into JSONModel.
Enumeration migrations
Save having to open DB connections manually by exposing $testdb to the test suite