TileManager dependency management

If the build does not contain TileManager.js, do not create a TileManager
instance for the map. If the build does not contain Layer/Grid.js, do not
try to add Grid layer instances to the list of layers managed by the
TileManager.
Fixing dependencies

This avoids undefined this.tileManager.addMap, and re-adds the TileManager
to the mobile build profile.