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.
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.
Share json_response between functional tests
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.
Add edition to policy topics when setting policies

Announcement and Publicationesque editions can be assigned to policies
and topics separately. When a policy is chosen (in the admin interface),
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
Wrap long lines for clarity
Compile mustache when running cucumber

If you don't compile the mustache templates you'll find that the
JavaScript `templates` variable (from Hogan.js) hasn't been defined by
the time you need it.

In production they're compiled via the asset pipeline. In development
they aren't compiled at all (so that they're loaded fresh from disk with
each new request). This commit makes up-to-date compiled versions
available when you run `rake cucumber`.