Import topology and snapping stuff from mapentity (generic)
Upgrade to Leaflet 0.6 (fixes #692)