Added tests for allocations

Also cleaned up a bunch of pyflakes/pep8 issues, and improved the User model
API.
MOAR TESTS

Also change Numeric type to custom Currency type, so that sqlite tests run
accurately.