TIMOB-12289: Make java objects hold a weak reference when we detach

https://jira.appcelerator.org/browse/TIMOB-12288

Please run the test case in Jira (the second one) and do a brief pass of KS.