Coverage: Clean up ModBreaks treatment
This fixes a few issues with out treatment of ticks (and breakpoints):
- Eliminate an unnecesary (and arguably wrong) filename check
- Fix a thunk leak due to the
tickBoxCount
field - Refactor and consolidate the logic for adding box ticks to the environment
- Avoid producing
ModBreaks
if we didn't produce any breakpoints
The latter point could be considered to be a bug-fix as emptyModBreaks
(which was previously produced) contains a bottom that is relatively easy to hit. ghcide
hits this fairly regularly, for instance.
Fixes #18229 (closed).