Enable basic GCC optimizations
Use `memcpy` instead of `memmove` in `caml_copy_string_with_length`

Since we allocate a new string right before copying the source data into this
freshly-allocated memory, the 2 regions can't overlap. In turn, this allows
using `memcpy` instead of `memmove`, which is cheaper.
Release the OCaml runtime lock around `tcbdbget`

In order to allow for multi-threaded read access to the database, the OCaml
runtime lock should be released when entering TokyoCabinet. In turn, this
requires some string copying.

This change releases the runtime lock, and adds the required copying, while
avoiding `malloc` calls for keys smaller than 1kB.
Rename `bdb_get` to `bdb_get_nolock` and restore original

See: 259f2fa8c53ce3eae53edacfdd74bedf799a5e85
Expose `bdb_get_nolock`
Merge pull request #13 from NicolasT/release-runtime-lock

Release runtime lock
Add `copy_from_cursor`
Track and throw errors from the correct DB

Previously, even when an error occurred in an operation acting on the source
database, `bdb_handle_error(ctbdb)` was being called. This change tracks
whether an error occurs during operations on `sbdb` or `tbdb`, and raises an
exception using the correct database accordingly.
Merge pull request #14 from NicolasT/ocaml-optimize

Add `copy_from_cursor`