Bugfix for loading all tasks into memmory for each userprogress request (each task run)

Please test your code with a dummy dataset with > 10000 tasks, and possibly the same for apps and users... I haven't done an exhaustive search of the app for this kind of problems, just fixed the one that took down our server...