fix submission deadlocks, fixes CNVS-15988

this removes our db triggers and instead uses AR callbacks in conjunction
with after_transaction_commit. this way we won't get processes fighting
over the same assigments tuple.

note that we can't actually remove the hairtrigger gem until we clean up/
remove all those old migrations :-/

test plan:
1. tests should pass (and cover 2. and 3.), but just to be sure...
2. ensure that "assignments needing grading" counts work as expected
3. ensure that quizzes w/ essays don't show as graded in the speedgrader
   until the essays have been graded

Change-Id: I6af67605b18378bd3c181c710ba5027ec944394b
Reviewed-on: https://gerrit.instructure.com/43202
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>