Fix bug which prevented timestamp autodetection.
Do not consider an empty restriction set an issue.

When a query has been "over-restricted" by too terse constraints that no
partition can satisfy, it is still a valid query. It only doesn't yield
anything.
Fix potentially invalid write in reset().

Propagated from actor-framework/actor-framework@d73291f123.
Small tweaks.
Optimize the candidate checker.

For queries with generic suffixes, such as orig_h, it may happen that the
schema resolver creates a pretty big disjunction, along the lines of

   (foo@2 || bar@2 || baz@2 || ..)

if orig_h exists in events foo, bar, and baz. However, we construct candidate
checkers per event. That means if construct one for event baz, then all other
terms in the disjunction become useless. The type resolver now removes these
superfluous terms.