Avoid recursing between keepalive and raw_command

On June 10 2014 one condition was addressed that caused infinite
recursion.  Then it was an invalid timer that could fire in the midst of
a command.  The case where this could validly occur was overlooked.
Address this by deferring invocation of keepalives until after command
exits.  If incommand indicated activity advances timeout in non
custom keepalive case, then the keepalive timer will actually be correctly advanced.

Change-Id: Iebe0241c1f928c4187f167f3ffa407f8c6f7fa84