Make API pagination work again

This was broken in the recent removal of Draper from our code base.

In fixing the code it became clear that as the fix would need to be
applied in several places which all shared the same code - hence a
refactoring to move the common code into a base class for API
presenters.
Merge commit '3d4d3e3ae79ae6574ef0cfba86034a9c6c73f55a' into HEAD