Add ActionFunction, a generic version of ActionBuilder

Also includes some other useful refinements on ActionFunction: ActionRefiner,
ActionTransformer, and ActionFilter.  Proposal for issue #1986.