Application settings may not be invalidated if migrations are run

I ran into this in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5532#note_83567366:

  1. When unicorn starts up, it will store the latest migrations_hash
  2. If I run migrations while unicorn is running, this changes the latest migrations_hash
  3. Updates to application settings will be invalidating the cache key with the old value in step 1.
  4. In an HA environment, other unicorn workers may start up after step 2 and use the other cached value.

The problem here is that we can't guarantee that migrations_hash won't change while the unicorn worker is running. We may need to periodically update this value or not rely on it.

/cc: @rymai