Added a couple of helper methods to make it easier to compare tasks
during sorting.

Reworked the sort comparators to make sure that they fully satisfy the
sort contract.

Increased the number of tasks being tested during the sort tests.  Also
added the missing tests for sort by date ascending/descending.
Fixed a bad copy/paste error that managed to sneak through.
Merge pull request #445 from jaydm/sorting-438-442

Simplify sorting and make sure that the sorts satisfy the comparator 'contract'