The todos page limit is 20, and both that and a user's pending todo count are
integers. Using integer division means that the result's floor will be taken,
defeating the point of the later call to `#ceil`.
So we need to convert one side of the division to a float first, otherwise the
last page won't be treated as available.
When there are no filters, we can get the total todos count from the cached
count on the user object, instead of performing a DB query. This query takes
about 80ms for me on GitLab.com.
Added the ability to 'Undo mark all as done' todos marked as complete with 'Mark all as done'
in the 'Todo' tab of the Todo dashboard.
The operation undos only the todo previously marked as done with the 'Mark al as done' button.
The Done button will change to an Undo button and the line item will be greyed out.
Bold links will be unbolded.
The user can undo the task by clicking the Undo button.