Move entity class to backend package.

More refactoring needed to consolidate constant references.
Refactoring to remove model layer refs from backend/acl code.

Permission lookup methods are now on the accessor model and the
permission object has been simplified.
Migrate backend-related code to its own backend modules.

There remains some front-end clutter and much naming to fix.
Next up: move backend test stuff to backend module.
Move some backend test harness code to the backend module.

This is far from finished and complete. The intention is to make
each module (including test code) more self-contained. However, testing
the backend without usable models (as defined in core) is tricky (though
definitely not impossible.)
More test refactoring. Not yet ready for prime time.

Currently there is an issue where backend tests run (seemingly)
concurrently, which leads to address-in-use errors.

Ultimately the best solution might be to mock the backend.
Move all integration tests to the main module.

Otherwise there's a problem with parallel test execution (and ensuing
chaos) that I can't figure out how to fix.