Avoid race condition in scheduled publications after data sync

The nightly data sync from prod->staging takes a while and there's a
potential race condition whereby a document which is scheduled for
publication during this time would not get enqueued on the staging side.
That's because by the time the DataSyncComplete job runs on staging it
is now 'overdue' and so this task would not have enqueued it.

I checked the behaviour of `Sidekiq::Worker#perform_at`[1]. If you
schedule a task in the past then it will run it immediately, which seems
like a reasonable behaviour in this context.

This PR therefore removes the constraint that the `queue_missing_jobs`
rake task should only enqueue future scheduled documents. Instead it
enqueues all scheduled documents including overdue ones.

[1]
https://github.com/mperham/sidekiq/blob/a652117e2e78603450e65985e7061c133599803d/lib/sidekiq/worker.rb#L50-L51
Re-registers unpublished/archived/deleted editions

Editions which have been archived or unpublished in Whitehall don't have
their state updated in Panopticon.

This adds the "unpublish" and "archive" verbs to the Panopticon
Registrar service listener and sets the adequate state on the
RegisterableEdition object sent to Panopticon.

This solution also requires updating `edition_test#should_remove_published_edition_from_search_index`
since this now triggers an external request.
Fixes failing tests

Adding "unpublish" and "archive" to the Panopticon Registrar service
listeners was causing test failures due to external requests being made

This PR uses the `stub_panopticon_registration` test helper to ensure
they are passing.
Clean logic for setting registerable edition state

* Clarifies logic for setting registerable edition state
Change tests for sending unpublishing changes to Panopticon

Adds integration testing for unpublishing to ensure all EditionServices
are actioned.

Removes cuke scenario for testing that Panopticon is notified of
unpublished documents.

Changes registerable_edition to ensure that the correct state is sent to
Panopticon.

Renames `edition_test#should_remove_published_edition_from_search_index`
to reflect that Panopticon is also notified.
Add rake task to re-register content in Panopticon

Archived editions and editions which have not been superseded should be
re-registered in Panopticon so their artefacts have the correct state
Fix failing test

Unpublished editions should retain a state of "draft" in Whitehall
while the RegisterableEdition sent to Panopticon should have a state of
"archived"
Rename RegisterableEdition#archivable?

Rename `RegisterableEdition#archivable?` to
`RegisterableEdition#no_longer_published?` for clarification
Refactor unpublishing integration test

* Uses unpublishing params to better reflect unpublishing real world
usage
* Move object creation to setup
* Extract unpublish method
* Improve conformity to style guide
Changes content to re-register

The editions to re-registered with Panopticon should have an
Unpublishing associated and should not be in the archived or deleted state.

For added safety, we grab the latest editions of that set.
Add RegisterableEditionBuilderForUnpublishedEditions

Extracts `RegisterableEditionBuilderForUnpublishedEditions` class to
build a set of registerable editions for unpublished content that
requires re-registering with Panopticon
Include control editions in testing

This tightens up the tests to ensure that non-unpublished editions are
being ignored.
Add additional logging on what gets registered

Will be useful to verify the results afterwards
Merge remote-tracking branch 'origin/reregister-unpublished-and-archived-documents'
Merge pull request #1638 from alphagov/avoid-scheduled-publish-race-condition-after-env-data-sync

Avoid race condition in scheduled publications after data sync
Merge remote-tracking branch 'origin/master'
Fixes panopticon:re_register_unpublished_editions

* Adds panopticon_api_credentials so that panopticon rake tasks can be
  run in development
* RegisterableEditionBuilder now excludes editions that do not have
  related documents
Adds data migration to reregister unpublished content
Actions PR comments

* Removes reregister unpublished content data migration
* Enforces checking for SupportingPage in RegisterableEditionBuilder
* Changes `require_relative` to `require` in rake task since lib is in
  the load path
Merge pull request #1629 from alphagov/reregister-unpublished-and-archived-documents

Re-registers unpublished/archived/deleted editions