Fixed shutdown hook in ClusterFixture
JAVA-1164: Replaced use of ThreadLocal<Random> subclass (used to override initialValue()) with a method
that explicitly gets the thread local value and sets it if it's null.  This avoids some nasty classloader issues
that show up particularly in web applications, where this anonymous subclass is holding a reference to the
 entire web app classloader, which is not released until the thread exits.
Fixed Checkstyle error
Using CodecRegistry for message encoding to ensure that the correct BsonDocument Codec is used depending on the actual class of the document
(which may be a RawBsonDocument or a BsonDocumentWrapper).