Store references to callback objects to prevent garbage collection.

As warned in https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/Callbacks the callback objects must be stored so they are not GC'ed.

Should fix crashes on windows and possibly others. Steps to crash firefox on windows:
1) start app manager w/ liadb
2) connect to phone
3) open about:memory and run GC

I've added comments to most of the lines since it seems a bit strange to create a variable that is only used once on the next line.