Refactor trace event checking
- Extract event checking infrastructure from analysis, so it can be used in tests as well.
- Improve it so it can cope with expected logical combinations of events (AND and OR)
- Remove a bit of syntactic overhead in the common case
- Allow easy combination of required events from different sources (other methods)
Also do some cleanup in trace.py:
- remove camel case and name mangling in method names to align with the rest of the code