Deferred action support

Allow actions to be executed as a background task, the state
of which can then be polled.