Rename next_end_at to next_start_at to reduce confusion.
(Hopefully) make query logic easier to understand.
Don't try calculate a start from the previous milestone.
Use start_at to find the previous milestone.
Simplify querying for entries.
Remove old comment.
Reintroduce check for end date > 1 day from the next start.
Prevent null cutoffs from limiting range incorrectly.
Fix issues with cutoff dates.
Fix incorrect sort order in previous/next milestone.