Herd now complains if any .cat file contains a provides-clause after
a requires-clause. In other words: users are required to write their
.cat files in two phases, firstly giving all the provides-clauses,
and after that giving all the requires-clauses.

Doing so clarifies to the user the order of evaluation of these clauses.
All provides-clauses are evaluated first, and executions that violate
them are silently removed. Then the requires-clauses are evaluated on
the remainder, and any violations are reported to the user. If a
requires-clause came before a provides-clause, and both were violated,
it might be confusing to the user; i.e., should the violation be
reported, or should the violating execution just be silently deleted?
Requires-clauses now working, at least in a rather basic form.

Herd now reports the number of executions that violate at least one
requires clause. This is the bare-bones functionality, of course,
but I believe I've implemented it in such a way that the functionality
can be extended easily, e.g. to say which requires-clauses are
violated, and by which specific executions.

The change is a little bit violent, I'm afraid. I made each
implementation of "check_event_structure" return not only the
final state, but a (state * int) pair. The first component is
the final state, as before, and the second component is the number of
requires clauses that the execution violated along the way. All the
other implementations of check_event_structure return 0 by default.
It would, of course, have been nicer not to have to modify those files.
Merging branch 'cpp+gpu' into Adding-lo-relation