Pull inbound packets from the inbound receiver's queue, figure out what
peer session they belong to (if any), authenticate and decrypt them
with the appropriate keys, and push them to the appropriate handler.
Does the given peer send us bad replies - either invalid store messages
(expired, corrupt, etc) or unreachable replies (pointing towards routers
that don't exist).
Write out keys to disk when we get them and periodically read ones we don't know
about into memory, with newly read routers are also added to the routing table.
Prepare this hash's cache for xor values - very few hashes will need it,
so we don't want to waste the memory, and lazy initialization would incur
online overhead to verify the initialization.
Since we are the inbound gateway, use the IV given to us as the first
16 bytes, ignore the 'prev' hop, and encrypt the message like every
other participant.
Expose a simple API for various router components to take note of
particular events that a peer enacts (sends us a message, agrees to
participate in a tunnel, etc).
Defines the minimum number of 'high capacity' peers that the organizer should
select when using the mean - if less than this many are available, select the
capacity by the median.
run in one of the TunnelGatewayPumper's threads, this pulls pending messages
off the prequeue, adds them to the queue and then tries to preprocess the queue,
scheduling a later delayed flush as necessary.