Add commands for getting the current delay.

Move the optional argument logic to a helper in the command handlers
and switch the argument order of the set_delay to be more consistent.

Change-Id: I51b5c7a60297cecc47eaf9a2d3e8f4d41ffcead9