Refactoring and test improvement

This branch vastly improves the tests, getting closer to the goal of being able to run

```
git clone <repo>
make
```

and have all the tests run and pass. Currently, you still have to do this to get the tests to run

```
make setup-test-environment test
```

but that will be fixed once I get farther along with the server refactoring.

The tests currently all pass except for one integration test, where the server doesn't return a `sessionId` when generating an account (ie. a genuine failure).