Support for acquiring the runtime lock in callbacks

Threads that call from C into OCaml [must hold the runtime lock during the call][runtime-lock-requirements].  There are two cases where the lock needs to be acquired explicitly:

* The call is made from a thread other than the main thread, or
* The call is made from a C function that was called while the runtime lock was released.

This pull request extends the changes in #164 to add support for acquiring the lock in a callback via the [runtime_lock][runtime_lock_argument] argument to `funptr`.

[runtime-lock-requirements]: http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html#htoc293
[runtime_lock_argument]: https://github.com/yallop/ocaml-ctypes/blob/fc85a75f2/src/ctypes-foreign-unthreaded/foreign.mli#L51