Minor refactoring and re-add internal tests, for now.

The internal tests still experience failures related to buildTestBracketed
on multi-threaded test runs. It's not ideal, but in the next version a
global client sealed with an MVar could be used to run the internal tests.

Finally, it's occurred to me that there may be some issues with multi-threaded
tests overlapping on keys. If two tests simultaneously put to two keys, they
could overwrite one another and cause one test to fail. A key prefixing scheme
in the tests would probably be good to implement, but as the keyspace is large
and keys aren't tested multiple times in the same test, I suspect it hasn't
been the cause of any issues yet and is unlikely to be in the future.