Added timeout and cancellation logic to the MTProtoClient and MTProtoConnection.