Added MongoDocFactory class and new methods to MongoDoc.