properly quote stuff in find_ids_in_ranges
properly quote stuff in find_ids_in_ranges

fixes problems when run on relations that are using `from()`

Change-Id: I528dfb7e6885b4ce276900a53d9b2f8adfabafe5
Reviewed-on: https://gerrit.instructure.com/149795
Reviewed-by: Rob Orton <7e09c9d3e96378bf549fc283fd6e1e5b7014cc33@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <c4fe2b1d90ef8f2548c8aeabfa633434316f0305@instructure.com>
QA-Review: Cody Cutrer <c4fe2b1d90ef8f2548c8aeabfa633434316f0305@instructure.com>

djbender/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,djbender/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,djbender/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms