feature/filter flushing execution

this PR from the shared branch will replace #1260 

this should implement correct behaviour for filter flushes.

```
filter {
  one { }
  if ... { two { } }
  else { ... }
  three { }
}
```

In the above, if 'two' emits an event periodically (via flush), then *only* 'three' should receive it.