Implement sorting

API :
GetTask(filter) => filter and not sort
GetTask(filter, comparator) => filter and sort

The notSorted() comparator is a dummy and won't be used when comparator is specified