speed_grader_json: load quizzes faster
speed_grader_json: load quizzes faster

this should provide a significant speed
boost to speed_grader_json for quizzes
by squashing a few N+1s (the most significant
N+1 being for Quiz loading). also made a tweak
to submission permission checks that should
improve performance.

closes CNVS-27323

test plan:
- create a quiz with submissions
- verify you can open the quiz in
  speedgrader

Change-Id: If069c52440e5981c872f57723e30d0d0665ec8ad
Reviewed-on: https://gerrit.instructure.com/73490
Reviewed-by: Cameron Matheson <1d572acbfa68c7c6e541c7b840d6b622e5c0dc91@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <9fbecd016338f9910821a8a5d5d0ae4fc9abfaa5@instructure.com>
Product-Review: Spencer Olson <7cc0890d6f1f70810a023e7173eca5724d6c8e49@instructure.com>

SwinburneOnline/canvas-lms,venturehive/canvas-lms,fronteerio/canvas-lms,roxolan/canvas-lms,venturehive/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,HotChalk/canvas-lms,SwinburneOnline/canvas-lms,grahamb/canvas-lms,djbender/canvas-lms,fronteerio/canvas-lms,roxolan/canvas-lms,sfu/canvas-lms,fronteerio/canvas-lms,grahamb/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms,HotChalk/canvas-lms,roxolan/canvas-lms,HotChalk/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,fronteerio/canvas-lms,roxolan/canvas-lms,djbender/canvas-lms,djbender/canvas-lms,venturehive/canvas-lms