Fix "overdue" and "today" queries

Before, the Task.search_tasks method did not handle the queries "overdue" and "today" correctly (they returned an empty list).