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
Add permissions
WIP enumeration frontend stubs

WIP Add enumeration frontend thingies

Move the dynamic enumeration translation definitions to a dedicated locales file

Tweak enumeration forms to operate in dialogs
Fire an ENUMERATION_CHANGED webhook event when the set of enum values changes.
Merge pull request #239 from hudmol/rename-enums-refired

Rename enums refired