Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object
Merge pull request #685 from bjori/PHP-1084-update-with-object-crashes

Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object

* bjori/PHP-1084-update-with-object-crashes:
  Fixed PHP-1084: collection->update($query, $document) crashes if $document is an object
This is testcase for PHP-1084 not PHP-1085
Fixed PHP-1085: w=0 can return an unexpected exception on failure