fix errors in error reports pagination stopgap
fix errors in error reports pagination stopgap

comedy of errors:

 * was adding 1 to the wrong paramter (page vs. per_page)
 * adding 1 to per_page was wrong anyways (offset is calculated from
   per_page, not just selection size)
 * was comparing @reports.size to page, instead of per_page
 * but can't use that approach anymore anyways, since we can't change
   the selection size independent of offset

instead, just use offset+pagesize as the total_entries, and then bump it
by one if we're not on the last page, where we check if we're on the
last page with a limit(1) query.

test-plan:
 - load first page of /error_reports
 - should have the most recent report first
 - should have the expected 20 reports
 - should have a next page link (assuming you have more than 20 reports
   in the DB)
 - load last page of /error_reports (e.g. page 3 if you have 50 reports
   in the DB)
 - should have the expected reports (e.g. oldest 10 reports if you have
   50 reports in the DB)
 - should not have a next page link

Change-Id: I141a3513427fe154e81d436460498dc28a2ecff9
Reviewed-on: https://gerrit.instructure.com/27134
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Reviewed-by: Brian Palmer <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@instructure.com>
QA-Review: Brian Palmer <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@instructure.com>
Product-Review: Brian Palmer <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@instructure.com>

greyhwndz/canvas-lms,AndranikMarkosyan/lms,gbleydon/canvas-lms,arrivu/hoodemo,jay3126/canvas-lms,skmezanul/canvas-lms,samuels410/greatlakes-lms,kyroskoh/canvas-lms,instructure/canvas-lms,samuels410/greatlakes-lms,leftplusrightllc/canvas-lms,AndranikMarkosyan/lms,narigone/canvas,efrj/canvas-lms,wimemx/Canvas,matematikk-mooc/canvas-lms,va7map/canvas-lms,djbender/canvas-lms,arrivu/qibla-ecampus,venturehive/canvas-lms,wimemx/Canvas,redconfetti/canvas-lms,samuels410/greatlakes-lms,arrivu/hoodemo,tgroshon/canvas-lms,ShreniiNepal/shrenii_lmp,ShreniiNepal/shrenii_lmp,utkarshx/canvas-lms,matematikk-mooc/canvas-lms,HotChalk/canvas-lms,jay3126/canvas-lms,AndranikMarkosyan/lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,redconfetti/canvas-lms,HotChalk/canvas-lms,utkarshx/canvas-lms,whalejasmine/canvas-lms,whalejasmine/canvas-lms,landonwilkins/canvas-lms,dgynn/canvas-lms,arrivu/arrivu-lms,gbleydon/canvas-lms,roxolan/canvas-lms,roxolan/canvas-lms,efrj/canvas-lms,wrdsb/canvas-lms,venturehive/canvas-lms,wrdsb/canvas-lms,juoni/canvas-lms,skmezanul/canvas-lms,dgynn/canvas-lms,djbender/canvas-lms,juoni/canvas-lms,Jyaasa/canvas-lms,antoniuslin/canvas-lms,HotChalk/canvas-lms,snehakachroo1/LSI_replica,venturehive/canvas-lms,grahamb/canvas-lms,fronteerio/canvas-lms,Unow/canvas-lms,instructure/canvas-lms,roxolan/canvas-lms,arrivu/arrivu-lms,sfu/canvas-lms,jay3126/canvas-lms,fronteerio/canvas-lms,sdeleon28/canvas-lms,sfu/canvas-lms,ShreniiNepal/shrenii_lmp,Jyaasa/canvas-lms,greyhwndz/canvas-lms,skmezanul/canvas-lms,eCNAP/CANVAS,grahamb/canvas-lms,instructure/canvas-lms,kyroskoh/canvas-lms,sdeleon28/canvas-lms,gbleydon/canvas-lms,leftplusrightllc/canvas-lms,sdeleon28/canvas-lms,kyroskoh/canvas-lms,narigone/canvas,eCNAP/CANVAS,instructure/canvas-lms,shidao-fm/canvas-lms,redconfetti/canvas-lms,arrivu/hoodemo,fronteerio/canvas-lms,wrdsb/canvas-lms,tgroshon/canvas-lms,usmschuck/canvas,SwinburneOnline/canvas-lms,jay3126/canvas-lms,utkarshx/canvas-lms,whalejasmine/canvas-lms,Unow/canvas-lms,va7map/canvas-lms,landonwilkins/canvas-lms,fronteerio/canvas-lms,juoni/canvas-lms,efrj/canvas-lms,grahamb/canvas-lms,arrivu/arrivu-lms,eCNAP/CANVAS,efrj/canvas-lms,utkarshx/canvas-lms,arrivu/qibla-ecampus,roxolan/canvas-lms,snehakachroo1/LSI_replica,SwinburneOnline/canvas-lms,matematikk-mooc/canvas-lms,leftplusrightllc/canvas-lms,instructure/canvas-lms,wrdsb/canvas-lms,antoniuslin/canvas-lms,dgynn/canvas-lms,sfu/canvas-lms,whalejasmine/canvas-lms,arrivu/qibla-ecampus,SwinburneOnline/canvas-lms,juoni/canvas-lms,tgroshon/canvas-lms,ShreniiNepal/shrenii_lmp,Unow/canvas-lms,eCNAP/CANVAS,sfu/canvas-lms,greyhwndz/canvas-lms,sfu/canvas-lms,antoniuslin/canvas-lms,SwinburneOnline/canvas-lms,leftplusrightllc/canvas-lms,tgroshon/canvas-lms,redconfetti/canvas-lms,sdeleon28/canvas-lms,Jyaasa/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,usmschuck/canvas,sfu/canvas-lms,matematikk-mooc/canvas-lms,skmezanul/canvas-lms,wye0220/shindig-canvas,Jyaasa/canvas-lms,dgynn/canvas-lms,Rvor/canvas-lms,narigone/canvas,va7map/canvas-lms,venturehive/canvas-lms,kyroskoh/canvas-lms,usmschuck/canvas,wimemx/Canvas,snehakachroo1/LSI_replica,djbender/canvas-lms,landonwilkins/canvas-lms,wye0220/shindig-canvas,instructure/canvas-lms,va7map/canvas-lms,Rvor/canvas-lms,greyhwndz/canvas-lms,grahamb/canvas-lms,Rvor/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,snehakachroo1/LSI_replica,usmschuck/canvas,landonwilkins/canvas-lms,AndranikMarkosyan/lms,antoniuslin/canvas-lms,Rvor/canvas-lms,shidao-fm/canvas-lms,narigone/canvas,samuels410/greatlakes-lms,grahamb/canvas-lms,wye0220/shindig-canvas