Handle packet loss correctly in logout/logon

Session establishment would fail to restart on loss due to deciding to
append to pending payload.  Fix by having the establishment phase
reset the payload situation.  On logout, the false to retry caused
raw_command to wait forever.  Fix by having raw_command not bother
waiting for such things.

Change-Id: I26d2116bf78440b3ccfc319094283c5d7a58cc5e