Since the two only entry points from API to read/write on the network
socket are 'send_message' and 'receive_type', and we manage the cancellation
by hand there (no undelying IO call here, just signals from loops), if both
are aware of TimeoutCancellable we can transparently switch to a more precise
"TIMED_OUT" error in that case instead of a plain "CANCELLED". API callers
can then easily distinguish between IOErrors.