CloudMade/Leaflet — pull request #1108 by basos9 (2012-10-31 18:54:16+00:00)
Title: MOD Events Core Object, make removal less expensive, use various optimizations

This is implement the first of the three optimization that I referred to the first comment on [this blog post](http://leafletjs.com/2012/10/25/leaflet-0-4-5-bugfix-release-and-plans-for-0.5.html). These aim at optimizing the handling of geoJSON layers with thousands of sublayers.

Refactor the Events Core Object so that the removal operation is not so much expensive is it was before. This reduces event removal cost at least to 1/3 (as conducted by test measures). This is apparent when removing event handlers from an already bloated map object.

We pay this with a slight increase in addition time, but this is negligible.

PR with other mods and example will follow