Move index sort to a <select> at the top of the page.

Subset of Mayhem 3ec442fc25457d4ad653c57223d191565abcf165
with necessary edits as usual.