improving pagination for JSON output

now uses a custom-written controller concern, instead of the Kaminari gem