Admin: Fix upgrade logic to work on lucene major version differences.

Also improved upgrade tests, and added test against static ES 0.20 index
which used Lucene 3.6.

closes #8013