From Jmucza: Prevent consumer from sleeping

The consumer thread would sleep even if data was returned from the
client.  We only need to sleep if nothing was returned from the server,
which means we should wait a bit until we do another long poll request
from the server for data.
From Jmucza: Use safer TrySetException in timeout

We setting an exception on a task, its generally safer to use
TrySetException.  SetException can throw an exception if the task is
completed.  In this case we might have a race condition when trying to
timeout the message and SetResult.