Moved log message up before closing the connection so that the connection still has an id.
Fixed Code.equals to not accept subclasses.
Implemented equals and hashCode for new BSON value types.
JAVA-1249: Moved Encoder, Decoder, and Codec into bson module.
JAVA-1249: Removed extraneous type parameter from Decoder.decode method.
JAVA-1249: Moved core BSON types and codecs into the bson module.
Changed parameter name in Encoder class from bsonWriter to writer, to match the one in Decoder
JAVA-1249: Introduced CodecRegistry interface and supporting interfaces and implementations for creating one. Replaced Codecs and PrimitiveCodecs with CodecRegistry

Renamed PrimitiveCodecSource to DocumentCodecSource
JAVA-1249: Created BsonTypeClassMap class that encapsulated the default mapping from a BSON type to a Class to decode it to.
Tightening up document codec
Renamed PrimitiveCodecSource to DBObjectCodecSource
Moved BSONTimestamp and associated classes to driver-compat
Moved CodecWithScope that contains a Document from org.bson.types to org.mongodb, the same package as Document
Added support for a closed type system for BSON, which among other things includes a type-safe BsonDocument class as well as a BsonDocumentCodec.  Introduce a BsonValue base class for all BSON types, and added ones that were missing, most notably BsonDocument, BsonArray, and the missing primitives like BsonInt32, BsonInt64, BsonBoolean, etc.
Added BsonDocumentWriter, a BsonWriter whose sink is a BsonDocument
Changed BSONReader and BSONWriter to interfaces, and added AbstractBSONReader and AbstractBSONWriter.  Refactored AbstractBSONReader to pull more behavior up, to make it easier to write subclasses.
Created BsonDocumentReader class that supports a BsonDocument as the source of a BSONReader.
Added missing Copyright
Changed CollectibleCodec interface to have three methods, so that it doesn't have to return the existing id unless needed.
MongoCollection now has a Codec property instead of a CollectibleCodec property, and does instanceof check on it as necessary.
All driver tests passing with BsonDocument-based Operation and Protocol implementations