Add `post_downgrade` hook for migration tests.

This can be used by tests to assert the state of the database after a
`downgrade` has been run.

This patch also renames `_prerun_#` to `_pre_upgrade` to match.

Change-Id: Id2a100a8270835d1ef6f9908ff5b89e2b531bb3c
Merge "Add `post_downgrade` hook for migration tests."