started refactoring map

using d3-hosted queue.js (could not find it locally)
now map.js (i.e. client side) only binds events for maptools icons,
as icons are rendered on server.
also added common event handler for all 3 of them,
rather than having different ones.