Move the entity logic into EntityBlueprint

* Added the manage_exception decorator
Make the SINGLE_USER_MODE and USE_SUBDOMAINS mode mutually exclusive
Small fixes
Working subdomains mode
Fixed PUT /groups/<schema> so the tests now pass.
Merge pull request #82 from borntyping/feature/blueprints

Subdomains mode (Closes #72)