application is now a normal table with a userdata member.
C -> lua with weak references.