Simplify collection of available surveys to complete
Don’t need user check

Dashboard is only available to logged in users.
Use counter instead of passing object
Use cached value on certificate instead of fragment
Calculate expiring certificates in database
Load info for each response in one query instead of two.
Use helper method for this
Simpler grouping loop for questions
Only call all_autocompleted once
Remove unused variable
f expiry
Move autocomplete_override_message to field on `Response`

An enormous amount of time was spent joining the `autocomplete_override_messages` table which was unnecessary as there should only be one message per field so it can be stored on the `Response`.

I’ve also renamed the field `explanation` as that was what it was being used for.
this is already a boolean
Merge branch 'feature-active-record-optimisation' into staging