Broadened logging support, and added logging bootstrap code.
Clean up of C-side interface following working JNI under Android.