clear query cache after unique_constraint_retry

it could have inserted a record, without clearing the cache.

found by rails 3 specs

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