make the appointment group permission check query a little less bad
make the appointment group permission check query a little less bad

fixes CNVS-32140

test plan
- ensure that new scheduler's find appointment mode still works

Change-Id: I083e3e33443884da19c8443dd2b1ecc3e171c6a1
Reviewed-on: https://gerrit.instructure.com/91002
Tested-by: Jenkins
Reviewed-by: Steven Burnett <a0b450117c5d20a22d5c4d52bb8ae13adee003d8@instructure.com>
QA-Review: Deepeeca Soundarrajan <5bcd4b623f00b7fc2942cd1c65c245b30a48a61f@instructure.com>
Product-Review: Ian Hoerner <57a33a5496950fec8433e4dd83347673459dcdfc@instructure.com>

HotChalk/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms,sfu/canvas-lms,HotChalk/canvas-lms,matematikk-mooc/canvas-lms,SwinburneOnline/canvas-lms,SwinburneOnline/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,matematikk-mooc/canvas-lms,instructure/canvas-lms,SwinburneOnline/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,matematikk-mooc/canvas-lms,HotChalk/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms,sfu/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,SwinburneOnline/canvas-lms,venturehive/canvas-lms,instructure/canvas-lms,venturehive/canvas-lms