Sort original metadata keys ending with an index

See ticket #9928.

To test, just check the output of ```showinf -nopix``` for one file in each of the affected formats and verify that metadata keys ending with an index are sorted numerically.  So there should be things like this:

```
timestamp #001
timestamp #002
...
timestamp #100
```

instead of:

```
timestamp #1
timestamp #100
timestamp #2
```