Fix memory leak during code_ws BSON decoding

See: bdcbc9586c3468432be663d3500e6941e395c590 (PR #520 fix for PHP-896)
Merge pull request #533