Implement Request Timeouts.

The implementation was kindly provided by Jeevan Kumar Jagadesh.
Request Timeouts: Fixup timeout handling.

This introduces a new "attention" event that is emitted if we receive
a done token with the attention flag set.

This cleans up the implementation a bit and actually fixes an issue
where we would switch back into the LoggedInState too early because we
did not actually wait for the attention acknowledgement.
Merge pull request #146 from arthurschreiber/add-request-timeout

Implement Request Timeouts