Add ability to hide completed dailies.

While I was at it, I also did a bit of refactoring in general around the hiding
of completed todos/dailies.


## EDIT BY ALYS: DO NOT MERGE THIS PR. See https://github.com/HabitRPG/habitrpg/pull/4129 which has fixes for merge conflicts. I'll close this PR when all the associated changes are finished.