Get rid of tor-proto's ChannelImpl, and use the reactor more instead
Instead of awkwardly sharing the internals of a tor-proto
Channel
between the reactor task and any other tasks, move most of the internals
into the reactor and have other tasks communicate with the reactor via
message-passing to allocate circuits and send cells.
This makes a lot of things simple, and has convenient properties like
not needing to wrap the Channel
in an Arc
(though some places in the
code still do this for now).
A lot of test code required tweaking in order to deal with the refactor;
in fact, fixing the tests probably took longer than writing the mainline
code (!). Importantly, we now use tokio
's tokio::test
annotation
instead of async_test
, so that we can run things in the background
(which is required to have reactors running for the circuit tests).
This is an instance of #205 (closed), and also kind of #217 (closed).