remove allocs/frees in couchbase.c // remove un-used functions // wrap fr_connection_release and json_object_puts in if blocks for safety