rewrite Map.js

- replace cookies by local storage
- remove variables from global namespace
- remove use of mobile variable as far as possible
remove trailing spaces
fix layer handling for disabled layers
remove cookies from server side
fix geolocation handling with new structure