refs #433, change default implementation of minUnsafeKey to assert
refs #433, fix error code
refs #433, fix conversion of BSONElement to String