Minor fixes

I added error checking to bson_append_finish_object() and modified the bson error codes to support this.  At same time, I eliminated CRT warnings for MSVS