Add Kaminari dependency for pagination.
Remove executable flag from govuk_content_api.rb.

Because you can't run it standalone (without the appropriate changes to
the load path) we shouldn't make it look like you can.
Add a `console` script for interactive hackery.
Pull tag listing tests out into a separate file.

They're going to need modifying to support pagination, so it seems to
make sense to pull them out somewhere separate to avoid the file getting
too long.
Paginate tag listings.
Remove unhelpful comment.
Pull pagination logic out into its own method.

This should make it fairly simple to apply to the other views.

Also: comments!
Refactor tag list view to pull out pagination.
Paginate the artefact listing.
Don't 404 if there are no results in a listing.

Strictly speaking, this is inconsistent with the rule that we
404 if the `page` parameter takes us beyond the end of the result
list, but 404ing on the first page would just confuse everyone.
Pull pagination out into a module.
Add a default number of items per page.

The Kaminari default is 25, which is a little close to the number of
items we could reasonably find in a section. This wouldn't break the
world, but if we can avoid having to make multiple pages' worth of API
requests from the browse pages, so much the better.
Use common pagination in `with_tag` responses.

By faking out the pagination, we can use the common code even when we're
not actually paginating anything yet, which leaves us the option if we
need it.
Use pagination code in local authority responses.

We're not actually paginating the results, though.
Fix inconsistency of the fake pagination class.

The fake class was using a method `total_pages`, rather than the `pages`
method used in the real class. The tests now test for the same methods
as are used in the `paginated.rabl` template.

As it turns out, the reason this didn't break any of the tests or views
is that RABL will fail silently if the object it is using doesn't
respond to the named attribute.

See <https://github.com/nesquena/rabl/blob/v0.6.14/lib/rabl/builder.rb#L67>
Use the fake pagination code for licences.
Put all the RABL configuration in one place.
Add pagination Link headers to tags.json.
Include page links under the `_response_info` key.

Two reasons: JSONP support, where the client can't access the
response headers, and clicking around the API in a browser, where
it's a pain to access the response headers.
Make all result sets respond to `links`.

This means we can take the check for a working method out of the RABL
template, along with the fallback to an empty array for nil responses.