First, the Lua garbage collector must collect the proxy userdata in Lua.
Second, the Java garbage collector must collect the actual Java objects.
Invoking collectgarbage("collect") triggers the first step.
Closing the Lua state is not necessary as the Lua state has relinquished its
references to the Java objects already. It now really is up to the Java
garbage collector to do its job.