Add a new action type "delayed".

A delayed action runs another action after a specified number of seconds
delay.

{
  // Run the delayed action after waiting X seconds.
  "action": "delayed",
  "seconds": <seconds>,
  "delayed_action": <action>
}

handle_action now sometimes returns a deferred value to help with testing.