tests: fix up recent conditionalized output changes
It looks like (!) can have surprising results matching back to the original
output when adjacent lines change, probably because it uses the same code
matching that allows (?) to skip missing output.
24f55686a63d ended up adding
unconditionalized check*{exec,link} lines, duplicating the conditionalized
lines. A Windows run wanted to delete the unconditionalized lines. This now
runs on both Windows and Linux.
util: rewrite sortdict using Python 2.7's OrderedDict
Pattern copied from
https://docs.python.org/dev/library/collections.html#ordereddict-examples-and-recipes.
test-casefolding: sync with latest code changes
This goes with
c2380b448265.