use internal location where possible
fix thumbnail and links
Merge branch 'master' of https://github.com/GeoNode/geonode into issue-809

Conflicts:
	geonode/layers/models.py
fix the maps thumbnails internal url
Merge pull request #1252 from simod/issue-809

Use OGC_SERVER.LOCATION for internal communication