Use request header to determine pagination link paths

Make sure the pagination links reflect whether the request is made via the public api using the HTTP_API_PREFIX header.
https://www.pivotaltracker.com/story/show/63295368