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
I doubt anyone is actually encoding these, but I found they were missing and these classes would get encoded as empty documents instead of the actual empty values.