PHP-1272 et al: Add missing bson_encode() tests and fix segfaults

 * https://jira.mongodb.org/browse/PHP-1272
 * https://jira.mongodb.org/browse/PHP-1273
 * https://jira.mongodb.org/browse/PHP-1277
An empty string is not a made-up value. Rather, these things are only identified by a type byte (just like `null`), so the encoded value is nothing.

This just seems odd because `bson_encode()` ignores the type byte and `e_name` token from the BSON spec.