order modules by id when possibly creating progressions

mitigates a deadlock that can occur on pg < 9.3

basically, it inserts into context_module_progressions for module 1
in one process, and module 2 in another. then it attempts to touch the
user in both, but they both have the user row locked from the insert
due to FK validation. if we do it in order, the insert will block
because it's the same entry in a unique index, preventing the later
deadlock

Change-Id: I5a97c184364defe445060fa3c6ce93a83f2b0840
Reviewed-on: https://gerrit.instructure.com/28254
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>