Don't exit on dirauths for some config transitions
Fix --enable-static-tor on OpenBSD

Previously we'd been using "we have clock_gettime()" as a proxy for
"we need -lrt to link a static libevent".  But that's not really
accurate: we should only add -lrt if searching for clock_gettime
function adds -lrt to our libraries.
If SOCK_CLOEXEC and friends fail, fall back to regular socket() calls

Since 0.2.3.1-alpha, we've supported the Linux extensions to socket(),
open(), socketpair(), and accept() that enable us to create an fd and
make it close-on-exec with a single syscall.  This not only saves us a
syscall (big deal), but makes us less vulnerable to race conditions
where we open a socket and then exec before we can make it
close-on-exec.

But these extensions are not supported on all Linuxes: They were added
between 2.6.23 or so and 2.6.28 or so.  If you were to build your Tor
against a recent Linux's kernel headers, and then run it with a older
kernel, you would find yourselve unable to open sockets.  Ouch!

The solution here is that, when one of these syscalls fails with
EINVAL, we should try again in the portable way.  This adds an extra
syscall in the case where we built with new headers and are running
with old ones, but it will at least allow Tor to work.

Fixes bug 5112; bugfix on 0.2.3.1-alpha.
Say that bug4438 was a fix on 0.2.1.9-alpha.

Specifically, it was a fix on 33e2053ebca5d, where we introduced the
WRA_* and ROUTER_* codes for dirserv_add_descriptor.  Previously, we
had checked for a _negative_ return from dirserv_add_descriptor, which
meant "rejected".  An insufficiently new descriptor would give a
0-valued return.  But when we switched from numbers to enums, we got
this check wrong and had init_keys() give an error whenever the
descriptor wasn't accepted.
Twiddle ROUTER_{MAX_COSMETIC_TIME_DIFFERENCE,MAX_AGE_TO_PUBLISH}

This is ticket 2479. Roger's original explanation was:

   We have a series of bugs where relays publish a descriptor within
   12 hours of their last descriptor, but the authorities drop it
   because it's not different "enough" from the last one and it's
   too close to the last one.

   The original goal of this idea was to a) reduce the number of new
   descriptors authorities accept (and thus have to store) and b)
   reduce the total number of descriptors that clients and mirrors
   fetch. It's a defense against bugs where relays publish a new
   descriptor every minute.

   Now that we're putting out one consensus per hour, we're doing
   better at the total damage that can be caused by 'b'.

   There are broader-scale design changes that would help here, and
   we've had a trac entry open for years about how relays should
   recognize that they're not in the consensus, or recognize when
   their publish failed, and republish sooner.

   In the mean time, I think we should change some of the parameters
   to make the problem less painful.
We allow IPv6 connections, don't use sockaddr_in with getsockname

This fixes client_check_address_changed to work better with IPv6 Tor
clients, and prevents them from spewing errors. Fix for ticket 5537.
Remove the deprecated FooListenAddress options from torrc.sample.in

Bug 5438.
Explain TransportProxy within doc/state-contents.txt.
fix bug 5572
Simplify DH prime generation logic some.

This is just refactoring work here. The old logic was kind of
convoluted, especially after the bug 5572 fix. We don't actually need to
distinguish so many cases here. Dropping detection of the
"!old_options || !old_options->DynamicDHGroups" case is fine because
that's the same that we'd do for clients.

Also add a changes file for bug 5572.
Include a Host: header with any HTTP/1.1 proxy request

Bugfix on 0.2.2.1-alpha, which added the orginal HTTP proxy
authentication code.  Fix for bug 5593.
Update to the April 2012 GeoIP database.
Merge remote-tracking branch 'origin/maint-0.2.2'
Merge branch 'bug5593' into maint-0.2.2
Merge remote-tracking branch 'origin/maint-0.2.2'
Obsolete GiveGuardFlagTo_CVE_2011_2768_VulnerableRelays

Closes ticket 4572.
Improve the message of validate_pluggable_transports_config().
Trivially refactor validate_pluggable_transports_config().

* Remove the ugly if statement.
* constify 'bridge_info_t' in SMARTLIST_FOREACH_BEGIN.
Document unit of bandwidth related options in sample torrc.
Don't fetch v2 networkstatuses from caches, even if auths are down

Fix for 5635; fix on 0.2.2.26-beta, where caches stopped fetching this
information.