optimize quiz question imports
optimize quiz question imports

 * only pull necessary columns
 * just grab all questions (from migrations), instead of sending
   massive queries
 * don't use an O(n^2) algorithm when matching after the query

test plan:
 * copy a course with a quiz
 * it should work

Change-Id: I3880b7364879611688d8738cc1791108a379edf4
Reviewed-on: https://gerrit.instructure.com/23361
Reviewed-by: Cody Cutrer <c4fe2b1d90ef8f2548c8aeabfa633434316f0305@instructure.com>
Product-Review: Cody Cutrer <c4fe2b1d90ef8f2548c8aeabfa633434316f0305@instructure.com>
QA-Review: Cody Cutrer <c4fe2b1d90ef8f2548c8aeabfa633434316f0305@instructure.com>
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>

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