Test data is now setup locally for each integration test.

The reason for doing this is to decouple the tests from each other (because of the data dependency) in an attempt to make them less brittle.

This change makes extensive use of the "build test data" plugin so that only data which is necessary for the actual test needs to be configured.

An attempt was made to keep the test data much the same, and the test cases themselves, but in some circumstances, some tests were changed and/or deleted, due to:

* tests which didn't actually test anything;
* seemingly impossible to fix hibernate errors (I could probably spend several more days on these, but honestly I don't think it's worth it).
A few commented-out bits here that might be able to be removed