Adding handler ids, fixing a leak.

As modestmaps-js added support for adding and removing individual map handlers recently, handlers should identify itself by an id. In addition, this pull requests fixes a leak to the global scope.