Refactor stubbing of search results

This will make changing the response format much easier.
Merge branch 'master' into related-links-and-tidy