Fixes to work around TJWS shutdown problem in Java

I changed our tests to create a single listener and re-use it for each test.
This isn't ideal since it's not clean. The ideal solution is to start a new
listener for each test. But there is a bug in TJWS that in Java when you
'shut it down' it actually leaves all of its threads running and they
do fun things like maintain locks on files and such. This is filed as
https://github.com/couchbase/couchbase-lite-java-listener/issues/43