More explanation: Just doing `sort_by(&:first)` is not sufficient because `sort_by`'s implementation is not stable. So if the query string looks like `c=1&a=2&b=3&a=4` I might get `4231`. The signing algorithm says the text to sign should be the values of the query parameters after sorting by key. What to do in the case of collisions is not specified (neither is encoding… sigh), but the Java implementation verifying my signatures seems to expect the values of duplicate keys to be in the same order as they appear in the query string itself, so we need to preserve that order.

Sorting by the pair `[original_desired_sort_key, index]` obviously preserves this, so this is my poor-man's stable sort (it'd be nice if there were just a flag to `sort` and `sort_by` to stably sort, but w/e.