set up p.na before preparing our reply version message.

Means we can use that instead of generating another (next commit).
fix tor range. add :: to make sure it is parsed as v6.
Handle tor and dns-name addresses.

Perform the requisite processing on .onion addresses to turn them into the tor
reserved ipv6 region (the same as bitcoind and onioncat). Furthermore,
when printing an ip address, reverse the conversion so we print it
nicely.  base32 as standard is uppercase, but tor and bitcoind seem to
use lowercase so we  first must for we force .onion addrs to uppercase
(and to lowercase on the reverse).

As a side effect we now should handle dns names on the command line (via tor if
required) and add them to the addressmanger as necessary.
Initial basic support for selection of external ip address.

This implements only the bare bones of external ip address selection
using very similar algorithms and selection methods to bitcoind. Every
address we bind to, and if we bind to the wildcard, every listening
address is recorded, and one for the appropriate address type of the
peer is selected.

Support for fetching addresses via upnp, external services, or via the
command line are not yet implemented.

Closes #35
pushVersionMessage: fix you/me address generation

The you address is the one we already set up fo the user, so either waht
we connected to (this will work with tor, etc), or the ip the user
connect to us from otherwise. We must however check to see if it is the address
of the proxy and strip it.

The me addesss, we use the same address selection for local addresses as
always

This should mean that we pass our tor address out in the version message
and thus the peers should add us to their addressmanager.
Add support for --externalip.

Closes #38
handle .onion addresses in deserialising addrmanager.

Use the generic function that already handles this.
Add basic support for UPnP.

This code borrows and fixes up a chunk of code to handle upnp from
Taipei-Torrent (https://github.com/jackpal/Taipei-Torrent), under
current versions of go none of the xml parsing was working correctly.
This fixes that and also refactors the SOAP code to be a little nicer by
stripping off the soap containers. It is still rather rough but seems to
correctly redirect ports and advertise the correct address.

Upnp is not run by default. --upnp will enable it, but it will still not
run if we are not listening or if --externalip is in use.

Closes #51
Shutdown server fully on ctrl-c

since we don't wait for peers, this largely just waits for the server procs
themselves to die. Unless the entire server is wedged (which is what kill -9 is
for) this should always shut down fairly swiftly.

This should mean we sync addrmanager and disestablish upnp correctly on
interrupt.

Discussed with davec.
Run interrupt handlers in lifo order.