Make addMapFeature.js re-entrant

We'll need (at least) two instances of addMapFeature.js on the map page (one for trees, one for resources) so make it re-entrant:
* Pull all variables inside the init() method
* Export only init()
* Return an object containing other interface functions

Recreate addPageMode.js as a tiny wrapper around addMapFeature.js