Hotfix 4.6.2: Avoid skipping timeouts with the RavenDB persister

Simplify querying for timeouts, and introduce cleaning-up abilities to guarantee we don't skip any timeouts

@andreasohlund @johnsimons please review