Fixed PHP-883: php_mongo_dbref_create() handling of MongoId values

If a MongoId or scalar is passed as the zid argument, it should be used as-is. Otherwise, assume the argument is a document and access its _id key/property if it is an array/object, respectively.
Fixed PHP-883: createDBRef() collection/DB method should omit $db

This restores original behavior, which was broken by 926d08d6965e88a07e2c9c0cd029484142a79c4e.
Rename ns parameter to collection for clarity

This parameter is the collection name, not the full namespace (i.e. db.collection).