Ensure damaged bookmarks are never leaked outside of the cache

Converting the cache to a damage-based approach improves the per-update
efficiency immensely, but carries some additional risk as invalid
bookmarks are deliberately left behind for performance reasons.

This patch specifically fixes an issue where bookmarks between the
undamaged step and the current iterator position were being treated as
repaired bookmarks, when in fact they were still damaged (as they had
never been seen during iteration in the document). The new logic will
ensure these bookmarks stay in the damaged region until they are
eventually iterated over in an updateCache call.

A happy side effect of this is that all query functions now only ever
return undamaged bookmarks, making the class itself easier to use and
understand.
Enable StepsCache verification in tests

The StepsCache verification feature verifies the cache after every
modification to ensure it does not contain any bad data. This is quite
slow to do in practice, but is very helpful for debugging, and for
tests.