Add topics to Announcement and Publicationesque

Previously, both these abstract types of Edition had many topics via
their associated policies. We'll now be storing their relationship with
topics separately from their relationship with policies.
Fix unit tests
Extract time into temporary variable
Cleanup expire_on_next_scheduled_publication method
Clean up TopicsControllerTest
Update cache invalidation tests for topic association

We used to invalidate the cache based on the published time of a topic's
policies' associated editions. Now that topics are associated directly
with editions, we don't need to go via the topic.
DRY up Edition::TopicsTest
Find topic's documents via policy if not directly associated

This commit should be reverted once the data migration that copies all
topics that are associated with Annoucement and Publicationesque edition
via a policy, directly to the `has_many :topics` association.
Rake task for copying policy topics to editions

Prior to this story Annoucement and Publicationesque instances were only
related to topics via their policies. We now store the relationship with
the topic explicitly for each announcement or publication. This rake
task will copy the topics over into the classification_memberships table
so that they'll be directly accessible in the `#topics` collection.
Add topics field to Announcement/Publicationesque forms
Serve JSON for policy's topics

While editing an edition, the admin UI needs to be able to populate the
topics form field based on policies that the user assigns to an edition.
An AJAX request retrieves the policy's topics (from this controller
action) so the list of topics can be updated dynamically.
Update edition's topics when policy selected

Announcement and Publicationesque editions can be assigned to policies
and topics separately. When a policy is chosen, an AJAX request is made
to determine the policy's topics. Those topics are then automatically
selected in the topics select tag.
Cucumber scenarios for assigning editions to topics
Tidy up TopicsController
Mercilessly refactor the incomprehensible
WIP: Return directly and indirectly associated docs when filtering by topic