WIP: ActionEvents filter

Requesting comments, especially on tests.  This branch includes some commits which are waiting on PR 140 and 141 to land, but the API should not change.

I'm not positive this exercises all possible cases; I'm also planning to add a 1-2 second delay in the event consumer loop so we can test adding actions midflight.

All input welcome!
I see this in four places in this file.

Just use s.PatchValue(...), then you don't need to defer restore(), as the framework does it for you.