tests/harness: make collate=sort order independent

The sort command produces different ordering from version to
version, so the Debian Wheezy ordering is different to the Debian
Jessie ordering. This is problematic as the sort was only applied
to the generated (got) output and not to the expected output.

To resolve this, both expected and got lists are sorted using the
Python sorted() method when collator='sort' is used on the Command
class. This ensures that both lists are in the same order before
being compared.