Minor fixes for conf.save()

Sorting the keys prior to saving, handling multi-value keys, and trivial
changes (whitespace, reordering, and putting the strip call in the try block
which is the only place it's needed).
Removing test.runner.get_connection_type()

Integration tests used the get_connection_type() method to either query or
infer attributes about the connection it was running against. This was stupid -
they should query the attributes directly and make test assertions based on
that. The get_connection_type() value was our testing target which should
simply be a user friendly tag for a set of testing attributes. Next I'll be
moving testing targets completely from the runner so they only exist in
'run_tests.py'.
Overhaul of integ testing targets

The integration testing targets had grown organically and were partly defined
in mulitple places. Now that I've played with them a bit I've realized that
testing targets are purely a mapping between user input and runner attributes.
Hence I'm removing all notion of testing targets from runner.py, and instead
having the run_tests.py handle all conversion between test targets and runtime
attributes.

All target attributes are now generalized and stored in a large dictionary.
Good news is that this makes code readability and maintainability far easier.
Need a new target? Just add an enum and the attributes to the hash. Down side
is that this is more static configuration than code, and run_tests.py would
be far nicer without it.

I'll next look into moving this to a test_settings.cfg to abstract code from
testing configuration but references to constants (test.runner.OPT_* and
stem.version.Requirements) will take a little thought.
Moving test target attributes to config

Moving the attributes for integration testing targets from a big dictionary in
the source to a separate configuration file. Progress!
Replacing runner OPT_* with enumeration

Replacing the test.runner.OPT_* constants with an enumeration. This is a little
more elegant and lets us get rid of the cluncky RUNNER_OPT_MAPPING dictionary.
Renaming get_connection_options() to get_options()

The Runner.get_connection_options() method is no longer really connection torrc
options, but rather all custom options for our instance. This is frequently
used so having a shorter name is nice to have, too.
Minor runner refactoring

Messing with the order, dropping the get_torrc function, and using STEM_BASE
rather than figuring this out again in 'run_tests.py'.
Renaming CONN_* targets to RUN_*

The former CONN_* targets each represent a run of the integration tests. These
were originally called CONN_* because they defined torrc parameters for
connecting to tor, but as time went on they became more general. RUN_* (for
instance RUN_ALL) is far more intuitive to users.

Also dropping the 'integ' prefix from target configurations. It's accurate, but
pointless to have. Target options are used frequently enough that we shouldn't
make them more verbose without a reason.
Expanding Config class' set() method

Users of the set method would usually expect it to overwrite our current
configuration value rather than append to it (thanks to Sathyanarayanan for the
catch). Also expanding it to handle list or tuple values.
Overhaul of run_tests.py

Several substantial changes to the run_tests.py script to improve readability:
- splitting arg parsing from the rest of the main function
- adding a config sync method to keep config dictinaries in sync with the main
  configuration (this will be especially important for arm since it allows for
  proper runtime configuration editing)
- moving remaining print functions into test/output.py
- lots of general cleanup

Remaining todo items from this...
- still need to add testing for the config listeners
- we should note the module that failed with the failures at the end
- we still need multi-line config entries
- the --no-color option was added but not yet implemented
- the RUN_NONE target looks to be broken
Synchronizing runner config

Using the shiny new sync() method for the runner config to make the world a
better place.
Eliminating the 'test.' config prefix

It's redundant for testing configurations to have a 'test.' prefix.
Configurations are already segregated by their handle so they would be only
accessed via the 'test' config anyway.

My heart isn't set on these config hierarchies but this will do until someone
proposes something better.
Implementing testing --no-color arg

An option for suppressing color escape sequences is important for when test
output is piped to a file (the escape characters then just look like
gibberish). Still... output is sooooo ugly without color. :(

Routing most of the testing stdout writes through the output module, and
either respecting or discarding formatting there based on if we had a
'--no-color' argument.
Unit testing for stem.util.conf

I needed unit tests for the new listener functions so wrote long overdue tests
for everything within the utilitity too. Caught a couple bugs in the process.
Integ RUN_NONE target wasn't runnable

The RUN_NONE target wasn't being included among the runnable integration
targets because it had an empty torrc which failed a check that should have
been for the attribute's existance instead.

Also correcting the case of the 'TARGETS' enum. While it is a contant, I've
been going with class case contentions for enumerations.
Including the test type or target with errors

When we have a failed test run with numerous targets we know at the end that an
error occured and what it is, but not what target it occured under. It's a pita
to scroll back looking for a stacktrace so including this with the footer's
error information.
Config support for multi-line entries

Adding support for multi-line values in the configuration files. I've wanted
this for a while, mostly for user facing messages. This still needs an integ
test.
Integ testing for multi-line configs
Renaming the Config update method to synchronize()

Calling this method 'update()' has confused a couple people. It changes a
dictionary to match the key/values in our current configuration. Calling
this synchronize() makes more sense though now I should change the sync()
method - that's next.
Dropping Config.sync() in favor of config_dict()

The Config class' sync method was a step in the right direction, but the name
was confusing and the usage was suboptimal. In the vast majority of cases the
caller simply wants a dictionary that stays in sync with the configuration. The
config_dict() function is essentially the same as sync but with more succinct
calls.