bson: it should be okay to pass any length and detect failure.
tests: check return value of bson_append_*().