Update schema check to work with new migration ordering
This is a first pass at implementing the changes I made here: gitlab-org/gitlab!155647 (merged)
There are some problematic aspects of postresql.rb
but I tried to clean the logic up a bit and stay within the spirit of what I believe we're trying to accomplish. I am also not sure but fairly confident that the changes to the docker and bash scripts are in the right places.
Closes #2024 (closed)