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
Rejigged custom validations to hang off the JSONModel class instead of the module.

Still need to store a reference to the validations in the schema, but at least
it's only one reference rather than the list of validations.
Switch the schema to use an atom
Reworked JSONModels to make schemas reloadable