improve assignments_needing_moderation query
improve assignments_needing_moderation query

move the need_grading_info subquery on submissions
into the main query so we can restrict it to the
submissions that have provisional grades

test plan:
* the to-do list should behave the same as before
for graders for moderated grading assignments

closes #GRADE-272

Change-Id: I9fb83636ac058393e393874867f5f57ad8128955
Reviewed-on: https://gerrit.instructure.com/126246
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <20252aad5efdc666f083d82ab63ed0f9f72a043e@instructure.com>
Reviewed-by: Jeremy Stanley <b3f594e10a9edcf5413cf1190121d45078c62290@instructure.com>
QA-Review: Indira Pai <9d2d5fa73bc5f5239dec42fbfd2a2b8495480e96@instructure.com>
Product-Review: James Williams  <3a5f4ed991dbfa5c9ef76ad729d240ca12f62180@instructure.com>

djbender/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,venturehive/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,djbender/canvas-lms,venturehive/canvas-lms,sfu/canvas-lms,djbender/canvas-lms