Instead of calculating the response date on view set it on update

This allows us to ensure the date is set in the DB which can then be
used to check the presence of a published consultation response, by
using the published_on date.

Use published_on to check publication of response

Also add a data migration to set the published_on date on responses
with summaries and no published_on date, or attachments and no
published_on date

This is beacuse we are currently treating the response as 'outcome' if
it has an attachment or a summary but not setting the published_on
date, and there is old data that needs cleaning up.

Also move class methods into scopes