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!
Given that these attributes are inside the structure that is serialised as actionresults, I don't think we need the prefix here on the json name. Just "error" and "result" would be fine IMO.