Fix typos in TorNet.py
Stop using unsupported torrc options

When writing a torrc file, check if the selected tor binary supports the
option in each line we're writing out, using tor --list-torrc-options.
If it doesn't, disable the option line by commenting it out.
(And add a note "unsupported" to avoid confusion.)
Ensure chutney kills leftover tor processes

Ensure chutney kills tor processes which are left over from previous
runs.

tools/bootstrap-network.sh: kill tor nodes by pid file before archiving
old configs. This ensures that tor processes are killed even if the
flavour has changed.

tools/kill-current.sh: kill tor nodes by pid file, like in
bootstrap-network.sh, but as a separate command.

tools/kill-all-nodes.sh: kill tor nodes by command line arguments.
Assumes that "chutney" is in the command line iff the tor nodes were
launched by chutney. Risky if executed on a system with important tor
instances. (But no-one would do that, would they?)
Ensure chutney relays can exit to localhost IPv4 and IPv6

Keep up to date with changes in the latest tor versions, where localhost
exits are blocked by default, even in TestingTorNetworks.

relay.tmpl: permit exits to IPv4 and IPv6 (tor versions without the
torrc IPv6 options will benefit from the changes in
issue-13161-check-torrc-options).

relay-exit-v4-only.tmpl, relay-exit-v6-only.tmpl, relay-non-exit.tmpl:
self-explanatory variants.

exit-v4.i, exit-v6.i: include files containing the exit lines for IPv4
and IPv6.
Enable Debugging of chutney-launched tor nodes

Set DisableDebuggerAttachment to 0, because if you're running a
test network, you might actually want to use a debugger on tor.
Increase relays to compensate for smaller guard fraction

Since the guard percentage has been reduced from 50% to 25% of relays,
we need more relays to compensate. This patch uses 8 relays, ensuring
at least 2 guards on all known tor versions.
Check RunAsDaemon before using wait()

Avoid hangs by checking for RunAsDaemon 1 in the torrc before using
wait() on a launched tor process. Iff it's absent, use poll().

A configurable poll() time is provided in env['poll_launch_time'],
and a default in env['poll_launch_time_default'] is used when the torrc
is unexpectedly missing RunAsDaemon 1.
(TODO: We may only need one of these?)
Force authorities to vote Exit & Guard for all nodes

Use the new tor TestingDirAuthVoteExit option, and the
TestingDirAuthVoteGuard option, to make all authorities vote all relays
(and authorities) as exits and guards. This ensures that tor's
make test-network will work. But it's a sledgehammer approach.

Requires either the new tor TestingDirAuthVoteExit option, or the
issue-13161-check-torrc-options patch for chutney.
Create a middle flavour, and size variants for basic and middle

Create a middle flavour, which includes non-exit routers.

Create size variants for basic and middle, with 25 and 100 tor nodes.
As these variants get larger, approximate the proportions of the global
tor network.
Merge branch 'issue-13161-typos' into issue-13161-check-torrc-options

Fix a single typo in lib/chutney/TorNet.py
Merge branch 'issue-13161-template-tweaks'
Merge branch 'issue-13161-ensure-kill-chutney-tors'