Drop left over SQL indexes that prevent removal of sortkey

In I3d2d80417 some indexes, that reference sortkey, were missed to be
dropped in the database. As the consequence, I87660f8e0 is failing to
remove the sortkey column as it is still referenced.

Drop stale indexes from the database when they exist. This is always
the case when gerrit site was created before 2.9 release.

TEST PLAN:

* For all supported SQL dialects: PostgreSQL, H2, MySQL, Oracle, MaxDB
create gerrit site with version 2.8.6.1, first version that supports
transactions (older versions work as well)
* apply this change
* upgrade site to schema 102

Expected:
Upgrade should work, stale indexes must be dropped and sort_key column
should be removed from changes table.

Verify: Use native database command line tool or gerrit gsql command

  $>ssh g gerrit gsql
  \d changes

confirm that changes table doesn't contain sort_key column.

Change-Id: I56aaefa7a53935ca65fbd2cbacc64c3920d343df
1 file changed