extract EventStream::Index#select_cql
extract EventStream::Index#select_cql

refs CNVS-6755

cleans up code a little, there will be times we need this same snippet
elsewhere

test-plan: N/A

Change-Id: Ia210165f7799b97a825eff0d91c5d3afc416012d
Reviewed-on: https://gerrit.instructure.com/22974
Reviewed-by: Jacob Fugal <f862f167b85d41b225785c70d70808bc7337c1fe@instructure.com>
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Product-Review: Jacob Fugal <f862f167b85d41b225785c70d70808bc7337c1fe@instructure.com>
QA-Review: Jacob Fugal <f862f167b85d41b225785c70d70808bc7337c1fe@instructure.com>

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