Fix for RT#81567

hash randomisation in perl 5.17.6 requires that we sort hashes if we
want the output to be in a certain order.
version number bump
adding unit tests for RT#68736

This has probably worked for a long time, but it hasn't been tested.

I'm adding the unit tests so I can close the report.