Implement a way to clean up weak reference objects when they are empty of callbacks / pointers. [#369]
Do a preliminary check for ref.pointers existing. [#369, #392]
Merge pull request #421 from mikeric/fix/weakmap-memory-leak

Fix memory leak in weakmap