add partial support for filters, theoretical event support, more work on subscription interface

far too many things in this commit, unfortunately I cannot finish the work without async support, so I think it is better to merge as-is so we avoid big merge effort later
The event api might also have to be changed later, it is far from perfect.
I checked that everything compiles and tests work
I this we will need extract subscriptions into a separate component, I think. And has big part of it own functionality...
It becomes too large.
ok. )