rearrange java_bridge.lua to use local functions
register userdata metatables in java_bridge.lua instead of C code