Unified search cleanups

Various cleanups to the unified search code, mainly based on comments made to https://github.com/alphagov/rummager/pull/204 after it had been merged.