Unit tests relating to database deletion and univoked/double invoked callbacks

I hope these make sense.

I've added timeouts to the tests so that un-invoked callback tests will actually fail.

The double-invoked callback test is clumsy but using extra transactions allows me to enforce ordering.

I've had to skip most of the delete tests as the current client is killed by one of them, and the missing close callbacks invalidates two of the others.  Fortunately the remaining test simply fails for relevant reasons,