fix map dragging in infobar

Dragging the map in the infobar was broken, because the state variables it needed are declared in `data/ui.js` but are used in `data/infobar.js`. After infobar.js was namespaced in a recent refactor, it was unable to access these state variables. Fixed by moving the state variables from `ui.js` to `infobar.js`, since they are only needed there and are kept alive via closure.

The console errors from #588 were also caused by this issue. Fixes #588.