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!
This is exactly the same code as before.  Try to eliminate the type conversions.