moved global JS function registration to TitouchdbModule class; started implementing Revision classes. 005_database_validation passes.