Clear weak refs before disposing anything
Refactor Dalvik wrapper and add cleanup using WeakRef