C++ template library for dealing with JNI stuff