Finish refactoring the rules, and get rid of the separate django/sqlalchemy concerns.  It never worked anyway.
Cleanup and repairs for testing.
Fix issue where inheritance checking dictionary forgot about the key entries not related to inheritance.
More fixes and cleanup
Python2 fixes.