When a polyline is removed from the map, remove it from the internal polyline list.
Add safety code to prevent exceptions when `that._map` is null
For methods added to map, get map using `this` rather than `that._map`

Because `that._map` is null after the first polyline is removed from the map.
Convert leaflet-editable-polyline to use polygons instead of polylines