Minor updates to maps
Refs #1845 Adding failing JS test for use case discussed

Goal: . make it hard to misuse API

Bug: if trackPageView is pushed to async before setTrackerUrl, the request will not be tracked.

Solution: setTrackerUrl should be executed first even if i was async "pushed" at a later stage (Benaka has patch).
Refs #1845
 * the tests/js is now passing following Benaka's commit, sweeet
 * Adding setsiteId to the "special case" so that setSiteId can be called after trackpageView and it still works
 * Adding pathname in the generated JS
 * HTML entity the & in the IMG src