Remove LearnCircuitBuildTimeout and CircuitBuildTimeout from torrc.

These are no longer necessary since #3443 was fixed ("Client
with low CBT can't establish any circuits"). My hourly tests don't show
an increase in failures without these options set. They had already been
removed from the PT build in tor-browser-bundle.git.
Typo.
Update docs for new appengine SDK.
Add flashproxy.util.addr_family function.
Use resolved listener addresses for port forwarding.

Previously we used remote_addr, the actual address given on the command
line. The difference is that after opening the listener, we know what
port ":0" became, so this is now possible:
	./flashproxy-client --external --port-forwarding :9001 :0
The other thing we can do is skip IPv6 addresses, because it appears
that UPnP and NAT-PMP are for TCP/IPv4 ports only.

The above command will produce output like

2014-02-01 17:07:01 Listening remote on 0.0.0.0:40138.
2014-02-01 17:07:01 Listening remote on [::]:55179.
2014-02-01 17:07:01 Listening local on 127.0.0.1:9001.
2014-02-01 17:07:01 Listening local on [::1]:9001.
2014-02-01 17:07:01 Not forwarding to [::]:55179 because it is not an IPv4 address.
2014-02-01 17:07:01 Running port forwarding command: tor-fw-helper -p 40138:40138
Remove unused TEST_ALL.
Add tests for flashproxy.util.format_addr.
Raise ValueError on non-integer port in format_addr.
ChangeLog for forwarding port 0.
Make version number extraction compatible with Python 2.6.
Fix the test for duplicate --register-addr.

Was broken by 4b0292e01bca5aa6e2585340f8bd8a2a09034682.
Also figure out the register_addr after opening listeners.

So that you register the proper port number when you give ":0" on the
command line.

There may be up to two listeners: one for IPv4 and one for IPv6, and
they may be on different ports or they may be the same. Previously they
could only be the same, so we could pass a specification like ":9000" to
a registration helper, and whether it happened to use IPv4 or IPv6
things would work out. Now that the ports may be different with ":0",
there is ambiguity because omitting the host part has meant
"registration helper guesses the external address" which really means
"the remote server the registration helper talks to guesses the
address." If we have, for example,
	$ ./flashproxy-client --external --register :9001 :0
	2014-02-01 21:35:29 Listening remote on 0.0.0.0:10000.
	2014-02-01 21:35:29 Listening remote on [::]:20000.
it would be a mistake to try and register both ":10000" and ":20000",
because they will both be guessed to be the same address family. We
don't have a way to hint to registration helpers that a guessed address
should belong to a certain address family.

A similar but smaller difficulty exists with --register-addr. That
option takes default values from the actual listening address, so that
you can, for example, provide an IP address and have the port filled in
automatically. Providing an IPv4 address would cause the IPv4 address to
be registered twice, once correctly with a port belonging to IPv4 and
once incorrectly with a port belonging to IPv6.

Unsure fo the best way to handle this, I kept that there is a single
register_addr, and it is set only to the IPv4 listener. The behavior is
the same in all cases that worked before; that is, all cases that don't
use ":0" as a port specification. If you need to override it, you can
use --register-addr.
Add format_addr tests with an empty string for the host part.

Since 5d3ae963fa6b514c28e5ad37e60a165d82526831, (addr, port) pairs can
have "" as well as None in the addr part.

One of the new tests is failing for me on OS X. The expected behavior
that I see on GNU/Linux is
	format_addr((None, 1234)) --> ":1234"
	format_addr(("", 1234))   --> ":1234"
On OS X, it is
	format_addr((None, 1234)) --> ":1234"
	format_addr(("", 1234))   --> "[]:1234"
Consider "" the same as None for the host part in format_addr.

Fixes the test failure in 597d0bb6271d64ca0c3f5a26155e537ae865573b.
Remove separate PYTHON_W32.

The purpose of having a separate variable was so you could build
GNU/Linux and Windows packages with one invocation of "make". The 3.x
bundles don't work like that and aren't ever likely to.
ChangeLog for format_addr fix.
Use mkstemp instead of NamedTemporaryFile.

NamedTemporaryFile can't be reopened by file name on Windows. The
precise failure was in
    ret = ctx.load_verify_locations(ca_file.name)
    assert ret == 1
The programs that use certificate pinning (flashproxy-reg-appspot,
flashproxy-reg-email) were not working on Windows.

This commit is a rediscovery of the same fix that was committed in
b3989fda65cb7f32f04369df656600e2655243b9.
Use get_state_dir in temp_cert.

Cause the temporary certificate file to be written in
TOR_PT_STATE_LOCATION. Fixes #10641.