Added WriteConcernSpecification, a good example of using data tables in Spock.  Tidied up some of the other tests
Converted the two tests that use JMock in driver-compat to Spock tests.
Removed JMock from driver-compat.  Marginally fewer dependencies now, and a lot fewer instances of JUnit on the classpath
Updated gradle build to run the driver-compat Spock tests correctly.
Fixed test for changes to constructor (merge issue)
Optimized imports
Fixed racy tests
Fixed compile-time issues for groovy tests in driver-compat
Added null check for return of Sasl.createClient, just in case the GSSAPI mechanism is not supported in whatever Java VM we're running against.
Synchronize close method in MonotonicSession.
Closing input stream in finally block
Closing DBCursor in finally block
Closing DBCursor in finally block
Given BSONBinaryReader optional ownership of the InputBuffer, and if it owns it, close the buffer when the reader is closed.
Given BSONBinaryWriter optional ownership of the OutputBuffer, and if it owns it, close the buffer when the writer is closed.
Wrapping java.nio.ByteBuffer in an interface called ByteBuf, which is Closeable, so that a ByteBuffer doesn't have to be paired with a BufferPool.
The ByteBuf.close method is implemented in a private inner class of PowerOfTwoByteBufferPool to return the underlying ByteBuffer to the pool.
Because of this, BufferPool just needs the get() method, and so is renamed to BufferProvider.  And PooledInputBuffer is no longer necessary,
so has been deleted.
Most of the changes here are just automated refactoring and renaming.
Cleaning up callback code to ensure that the callback is only called once.
FindBugs warnings
Pulled synchronous pipe methods and truncate methods from ChannelAwareOutputBuffer to OutputBuffer.  The only thing left in ChannelAwareOutputBuffer was the async pipe, so renamed it to AsyncOutputBuffer.
This let me change the signatures of most methods that took ChannelAwareOutputBuffer to just take an OutputBuffer.
Changed OutputBuffer pipeAndClose methods to just pipe.