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
You are using RETURN_STRINGL(), not RETURN_STRING(), the L suffix means you know the length.
The length of the string is 8, plus \0. The total space required is 9bytes.
Remember, char array is 0 indexed. Its 8th position is byte 9.