Prevents time-outs if too many published documents

Added pagination as required to fix:
https://www.pivotaltracker.com/story/show/66349416
and a few more tests to cover the controller index.