Add wrappers to blocking functions and callbacks in order to release
the GVL of ruby 1.9 as long as not in ruby code.

This allowes better concurrency in threaded applications.