Fix random scheduler when there is no task for an app. Fixes #545
Merge pull request #546 from PyBossa/issue-545-random

Fix random scheduler when there is no task for an app. Fixes #545