Fix memory leak in weakmap

Removes weak referenced objects when there are no more callbacks / pointers left for the object in question.

![screen shot 2014-11-12 at 8 24 33 pm](https://cloud.githubusercontent.com/assets/36068/5023308/1d13cf46-6aaa-11e4-9c40-3c9576620d2e.png)

#369