Adding beforeAll and afterAll

Adding a `beforeAll` and `afterAll` methods to the `hooks` object, allowing common setup and teardown common to all transactions. This is useful for executing asynchronous initialization steps, and also for preparing a test environment, while ensuring it's cleaned up after all tests have run.
The unit and integration tests have been updated accordingly, and the new code has 100% coverage.