Tests: Huge reorganization

This moves all of the backend tests into their own class that extends a
base test class that tests all of the common functionality.
Merge branch 'tests--reorganize'