4116 search only

This pull request implements the persistLocation option in LOCSERVICES-4116.

I fixed jshint issues in main.js test file as to not have a mix of 2 and 4 space indentation. The jshint fix and tests for new behaviour are in different commits.