PHP-896: Check remaining BSON buffer length before reads

See: https://jira.mongodb.org/browse/PHP-896