Extract default scope from the tasks controller

Place refactored code into the tasks model to make the controller more concise.

Extract instance variables from Tasks#index

Extract instance variables from tasks#index