Separating bridge scrubbing validation into method

Bridge descriptor scrubbing is a moving target and it's quite possible that
we'll need to parse descriptors that conform to a newer or older scheme. Hence
making scrubbing validation part of the constructor is inappropriate. Moving it
to a separate method instead.

This includes two methods, one to simply check if we think that the scrubbing
is right, and another to get descriptions of the issues. This is of limited
usefulness to callers, so we might need to switch to an exception hierchy
later. However, we don't have any use cases that care to check the scrubbing
yet so leaving that alone for now.
Mislabeled server descriptors as being version 3

We're using version 3 of the dir-spec, but server descriptors themselves are
still using their initial version. Correcting the class names and documentation
that labeled them as being version 3. Thanks to Karsten for the correction!
Parsing descriptors with a 127.0.0.1 address as bridges

A prior scrubbing scheme for bridge descriptors scrubbed their addresses to be
127.0.0.1 rather than 10.x.x.x. Parsing both as bridges so we're compatible
with both schemes. Thanks to Karsten for pointing this out.
Making descriptor reader persistence more convenient

Our current functions for loading/saving processed file listings are fine if
you want error handling and a great deal of control. However, I suspect that
most callers would prefer for this to be an attribute of the reader itself.

Adding an argument that performs best-effort persistance of our processed files
listing.
Making decriptor reader accept path or list of paths

More often than not people will want to read descriptors from a single path
rather than a list of paths. There's no need to make them wrap that path in a
list before calling us.
Supporting controllers in the connection module

Users will be using a BaseController subclass unless they really need to work
at a low level, in which case they'll be using a ControlSocket. Making the
connection module (which does authentication) support both.
Testing for the controller's asynchronous event handling

Adding a test that hammers the control socket with queries while also listening
for BW events. This also tests for and fixes a bug where listeners wouldn't get
all of the enqueued events if the controller was closed.
Expanding launch_tor to support commandline options

When writing small scripts we often want to start a tor instance for a special
purpose, for instance to test a new feature. When doing this we want a
bare-bones tor instance with just a few specific options. Adding better support
for this by making the launch_tor function accept command-line options and the
ability to use a blank torrc.
Integ tests for launch_tor

I've been leaving launch_tor untested because it was exercised in order to run
the integ tests and any tests involving it would take a long time, on the order
of a dozen seconds! Hey, it's a long time when you run this as often as I do...

It's an important function and has more options than what's exercised for
running integ tests so adding some tests for it.
Missed a few more 'version 3' labels
Skeleton for extra-info descriptors

Basic module for parsing extrainfo descriptors. This doesn't actually do any
parsing yet, just turning the raw content into a ExtraInfoDescriptor instance.
This abstracts code we'll need out of the server_descriptor module so we'll be
able to use it.

What code there is here is exercised via the runner tests.
Basic constraint checking for extra-info descriptors

Parsing the 'extra-info' line and performing basic validation about extra-info
descriptor fields (that we have required fields, most fields don't appear more
than once, etc).

I'll add some unit tests for this after I've added parsing for all of the
mandatory fields.
Bumping runtime of async event test by a second

Testing for asynchronous events relies on BW events happening every second by
checking that we get two of them. This is not reliable since we don't have a
hard assurance about its rate. Giving the test an extra second to make it more
reliable.
Parsing extrainfo published and router-signature lines

Parsing the remaining two mandatory fields for extrainfo descriptors. These
fields are identical to what's in server descriptors.
Unit tests for extrainfo descriptors

Few basic unit tests for extrainfo descriptors. These are done in a similar
fashion to the server descriptors. I'm highly tempted to refactor out some
common bits, but at present that would probably hurt code readability more than
it would help. This'll change if I keep using the same type of helpers for
descriptor unit tests.
Reverting change to recognize 127.0.0.1 as bridges

Reverting change 477d448 since Karsten reports that bridges with that scrubbing
scheme should no longer exist.
Helper function for parsing timestamp/intervals

Several extra-info descriptor lines are of the form...
'YYYY-MM-DD HH:MM:SS (NSEC s) *'

So making a helper function to parse it. Using it for the server descriptor's
read/write-history entries and it improves code readability quite a bit...
Parsing read/write-history lines in extrainfo descriptors

Copying the code for parsing from the server descriptors. I suspect that this
isn't yet exercised by the tests - I'm next gonna improve our integ tests then
check if this would be appropriate for a unit test too.
Extra-info integraion tests

ExtraInfo counterparts for parsing a metrics descriptor and tor's cached file.
There's some common bits with the server descriptor tests that I plan to move
out.
Letting runner's get_test_dir() provide resources

The most common use of the integ runner's get_test_dir() method is to get a
path for resources in that directory. Providing an optional argument to get
that path rather than making the caller use os.join().