De-duplicate Revision.down_revision helpers.
Fixes an issue when downgrading a revision where dependencies
are duplicated (e.g. by specifying the down_revision in depends_on).
This causes the down migrations to fail to remove the head, which is
caught by an assertion.
Added logic to de-duplicate the entries in _normalized_down_revisions
and _all_down_revisions without altering revision order.
This change revises the previous approach taken in
8d5a9a1b0d32fff5726010afffa48cc0fb738238 to address the problem
more generally outside of the topological algorithm.
Fixes: #843
Change-Id: I3517fb102b38c783c9a61bfb8dabc02c1fc89c4b