Implement guard nodes
We should implement Tor's guard node algorithm for Arti.
(The time estimate here does not include work for developing a state mechanism.)
Some possible steps:
- Create a "guard manager" type with the necessary API.
- Implement a multi-sample API in tor-netdir.
- Implement consensus parameters needed for guards
- Extend NetDir with efficient ID-based accessors.
- Minimal working-ish good-enough-for-vanguards guard implementation: * [ ] Sample a little set. * [ ] Pick first hop from that set. * [ ] Persistence on that set. * [ ] Expire and re-sample into that set as needed.
- Implement filtered, confirmed, and primary set backends.
- Mpsc channel inside circmgr that gets informed when a circuit is done or when a circuit fails.
- Make sure not to use a consensus until we have descriptors for our primary guards.