adhere to rails3 conventions for AR scope merge

perform ActiveRecord::Relation#merge in switchman
rather than attempting to pass a scope to
database_server a la our legacy sharding implementation

fixes CNVS-5295

Change-Id: Ieca7b706937d7956cfbf899519ea04aa6c3c9084
Reviewed-on: https://gerrit.instructure.com/28143
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
reset shard information on record dup

Change-Id: Ibb6977ec02e7e786133796b5538cc3fbef342753
Reviewed-on: https://gerrit.instructure.com/28285
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
use name instead of database_name in test_helper

now you can set shard1 and shard2 in your test database
config to avoid setting-up and tearing down shards
every time specs are run

Change-Id: Iab79a557119100ff2254689b9bf84cab0c4be64b
Reviewed-on: https://gerrit.instructure.com/28299
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
adjust foreign key attributes after setting shard

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