Adds an example project and re-organizes source into core.

Cleans up JNI a bit to pass function pointers around.