optimize submissionsAPIcontroller grouped option
optimize submissionsAPIcontroller grouped option

Changed a line in the submissAPIcontroller#index action
where group params are checked, from 'Submission.where'
to '@assignment.submissions.where' for better performance.

Test Plan:
1. Have a course with a few students enrolled
2. Create user groups and put at least two students
in one group.
3. Create an assignment set to be graded as a group
4. Have a student from one of the groups submit
to the assignment on behalf of the group.
5. With a teacher or admin token, ping the
Submissions list API with params grouped = true
Verify just a single assignment object is returned

Change-Id: I6940c262f8b972c9740bf9f553d28f39f671d5b3
Reviewed-on: https://gerrit.instructure.com/66541
Reviewed-by: Spencer Olson <7cc0890d6f1f70810a023e7173eca5724d6c8e49@instructure.com>
Product-Review: Spencer Olson <7cc0890d6f1f70810a023e7173eca5724d6c8e49@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <976bfc4bed0555ff96b3266aea18e7b17a9d471c@instructure.com>

roxolan/canvas-lms,fronteerio/canvas-lms,dgynn/canvas-lms,grahamb/canvas-lms,matematikk-mooc/canvas-lms,HotChalk/canvas-lms,redconfetti/canvas-lms,snehakachroo1/LSI_replica,snehakachroo1/LSI_replica,redconfetti/canvas-lms,SwinburneOnline/canvas-lms,HotChalk/canvas-lms,narigone/canvas,sfu/canvas-lms,sfu/canvas-lms,fronteerio/canvas-lms,instructure/canvas-lms,HotChalk/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms,redconfetti/canvas-lms,dgynn/canvas-lms,sfu/canvas-lms,matematikk-mooc/canvas-lms,narigone/canvas,dgynn/canvas-lms,SwinburneOnline/canvas-lms,roxolan/canvas-lms,djbender/canvas-lms,venturehive/canvas-lms,snehakachroo1/LSI_replica,sfu/canvas-lms,SwinburneOnline/canvas-lms,instructure/canvas-lms,roxolan/canvas-lms,matematikk-mooc/canvas-lms,fronteerio/canvas-lms,narigone/canvas,roxolan/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,HotChalk/canvas-lms,narigone/canvas,snehakachroo1/LSI_replica,dgynn/canvas-lms,instructure/canvas-lms,venturehive/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,redconfetti/canvas-lms,instructure/canvas-lms,venturehive/canvas-lms,fronteerio/canvas-lms,matematikk-mooc/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms