move sortTask to user.ops
[https://github.com/HabitRPG/habitrpg/issues/1977] [https://github.com/HabitRPG/habitrpg/issues/1616]
[#1977] misc fixes