Don't implicitly validate backend records while indexing
Fix all dynamic enums to use proper foreign key constraints.

Modified the ASModel corresponds_to class to automatically sniff out
dynamic enums and set them up.  Saves me forgetting to do it by hand
:P
Removed my silly debugging lines
Merge pull request #352 from hudmol/dynamic_enum_fix

Dynamic enum fix