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
JAVA-1258: 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.
JAVA-1258: Added BsonDocumentWriter, a BsonWriter whose sink is a BsonDocument
JAVA-1258: 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.
Fixed a bug in BSONBinaryWriter.pipe when used to pipe a document that is a field value of another document.
JAVA-1258: Created BsonDocumentReader class that supports a BsonDocument as the source of a BSONReader.
Added missing Copyright
JAVA-476: 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.