Only show the percentage of unresolved mappings when some exist

- Use an instance variable defined in the controller instead of data
  access in the views - pointed out by @jamiecobbett.
- Indent inside the `if` statement.
Refactor a tiny bit of data access in views to the controller

- Spotted by @jamiecobbett in https://github.com/alphagov/transition/pull/329.
Merge pull request #329 from alphagov/only_show_percentage_when_unresolved_mappings_exist

Only show the percentage of unresolved mappings when some exist
Merge pull request #330 from alphagov/refactor_site_tags_data_access_out_of_view

Refactor a tiny bit of data access in views to the controller
Update all of the gems so that Rails 4 works

- I've probably missed some, but there'll be further updates as I go
  through every error that now exists.
Fix some errors that came before any red tests

- Not entirely sure what these change, but I've done what the error
  output told me to do to fix the error:

  - Eager load the application only in production.
  - Remove the mass-assignment protection and the whitelist attributes
    ActiveRecord setting - this is done by strong_parameters in Rails 4.
Specify which HTTP methods to call on each route specified by match

- Using match on its own is deprecated.
Make RSpec render_views work again by including a new config line
Remove another assignment on ActiveRecord

- This would again complain about whitelisted parameters, when I tried
  to run the rails console.
Require 'rspec/expectations' and 'rspec/mocks' in spec_helper.rb
Remove deprecated specifying of which error is being raised
Remove the deprecated config.whiny_nils in dev and test
Use the new Rails 4.0 syntax for scopes
The use of stub (in some cases?) is deprecated - use double instead
Make the hits controller use strong parameters

(I plan to condense all the "make x use strong parameters" commits into
one eventually, but committing this now so I don't lose it or lose the
thread of where I am.)
Add config.secret_key_base to secret_token.rb

- Rails 4 needs this, apparently. Corresponding PR opened:
  https://github.gds/gds/alphagov-deployment/pull/633, which will
  replace 'overwritten' with an actual key. Is this fine as
  'overwritten'?