fix query_methods for table aliases

Change-Id: I21a331b5c296a5e8dec254b3b2b02898d7f30b66
Reviewed-on: https://gerrit.instructure.com/28974
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
sharding of ActionController::Base.cache_store

fixes CNVS-9546

 * have ActionController::Base.cache_store (and #cache_store) just defer to
   Rails.cache (with its sharding magic)
 * disallow Rails.cache=, due to it not working for shard differentiated
   caching
 * disallow ActionController::Base.cache_store= (and #cache_store=) for the
   same reason

also fleshes out the configuration of per-database cache stores in
Switchman::DatabaseServer#cache_store

Change-Id: Id1769b71fa8099d7aa9ef7d32b6f450fed025253
Reviewed-on: https://gerrit.instructure.com/28171
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
fix @shard initalization when object is initialized with a global id

Change-Id: Ib9e4e03de11aa40dee928d29745bb32c149ffb6b
Reviewed-on: https://gerrit.instructure.com/29391
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>