Added tracking of completion times for tasks.
Removed obsolete tasks helpers.
Made some Redis operations atomic. Refactored some methods on task model for faster reads and fewer unnecessary operations.
Renamed routine to is_routine on task model to match convention. Moved some CRUD operations to a hopefully more correct place in API code.
Added first pass at automated jobs to clear out completed tasks at midnight.