XS client library (faster than the native-perl one)

WIP: still requires polishing and might be incomplete