Avoid counting things for summary

* Use of #any? was triggering a count query
* Use of .to_a will make sure that #any? happens on an array
* Avoids one COUNT per summary category for a 30% speed boost
Eager load hosts and mappings
Fix a tags performance regression

* Switching to taggings for eager loading created a table
  scan on 250K row table taggings when indexing Mapping.
  Create an index to mitigate the effects of this.
* See https://github.com/alphagov/transition/commit/514f017ac2ecee7022faa603ee5c48e892d0d425
Merge pull request #307 from alphagov/performance-of-hits

Performance of hits pt1