bson: extract bson_reader_t functions into bson-reader.c.