Added a sortTasks function in LogicUtilities by using the current
TaskDefaultComparator.
AddTask and UpdateTask command will sort the tasks before they are
stored into the storage.