Combination of WIPs that make up the moving of most enums to the DB

WIP make some enums become dynamic_enums

WIP more tweakage of enums... tests still failing

WIP allow setting of default value of a dynamic enum in the migration (some schemas definitions required that to be moved to the DB); Tried to fix all tests.. migrations tests still a little messy.

WIP move note types to dynamic enums and also refacter the note template type lists to be generated by the notes_helper

WIP Move agent relator enums to the DB

Fix agent relationship schema definitions
Use BackendEnumSource.id_for_value
Add a helper for defining DynamicEnums in the DB migrations
Merge remote-tracking branch 'origin/pr-386'