PROTON-254: Resolve C++ compliation issues of the swig generated code for the Java binding

* Use Swig's JCALL macros to invoke JNI functions in order that code compiles under C or C++
* Bracket JNIEXPORTed functions in ifdef'd extern "C" {...} in order to preserve symbol name (which is critical to JNI)
* Add casting to resolve compile issues under C++

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1458567 13f79535-47bb-0310-9956-ffa450edef68