improve user search speed

this optimizes the query to use a union and
reduces speed from ~5s to ~0.2s

fixes CNVS-15212

test plan
 - go to /accounts/self
 - search for a user
 - it should work and be faster

Change-Id: I46fd32c4850c7e56e7ccf24eade6b63a1b2ba8ad
Reviewed-on: https://gerrit.instructure.com/40825
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>