Couple fixes for prior controller changes

Two minor bugs...
- our version parsing was broken for versions without a space in them
- we were quoting the runner password constant rather than using it, breaking
  the RUN_PASSWORD target

Also some minor whitespace tweaks and moving imports to the start of the file
(we're only doing method level imports if doing otherwise would break things).
We might change our import style later to resolve our circular imports, but
that'll be a project-wide change.
Adding --test argument to selectively run tests

Adding an argument that'll only run tests matching the given module prefix.
This is to make it faster to write new tests (so we don't need to wait a minute
for the full integ suite to run each time).

Also adding examples to the '--help' output and rearranging the options so
'--config' is at the end (it isn't especially useful and may be dropped in the
future.
Dumbing down syntax for python 2.5

Evidently even with the 'with' keyword's future import it still chokes on comma
delimited entries (instead you need to do nested 'with' blocks). Ick. Oh well,
if that's all we need to maintain 2.5 compatability then I'll be happy.

It's a pity we can't tell python 'run in 2.5 compatability mode' to check for
these things. I doubt that we'll remember to run against a 2.5 instance to keep
stem working there. Oh well, guess this is a problem that'll need to be
addressed when figuring out a release procedure.
Tor executable shouldn't be needed for unit tests

We only need a tor variable when running the integ tests. Dropping the check
that it exists in our path if we're just running the unit tests.
Adding module to check for requirements

Stem requires at least python 2.5, and beyond that our python version and
modules does impact what functionality we have available (yay). Adding a module
for tracking what we have available.
The followlinks arg of os.walk needs python 2.6

We were using the 'followlinks' argument two places: in the descriptor reader
and whitespace checker. For the former I'm noting that 2.6 is a requirement for
the argument and coding around it to work on 2.5. For the later I don't really
care if the whitespace checker follows links so I'm simply dropping the arg.
Adding todo notes around the stupid concessions to 2.5

I hate dirtying our code for ye old python 2.5. It's ancient and that fact
isn't getting rosier very fast. However, a lot of people still use it so we
should still support it for now. This won't always be the case so including
TODO notes to remove these icky bits when we drop compatability for it.
Tuples lack an index method in python 2.5

Yet another python 2.5 compatability hack.
Patched mocking.mock() to handle standard library functions

Although standard library functions have the same type as built-in functions,
they cannot be mocked using the same setattr approach.  To fix this, we patched
mocking.mock() to first look for built-in functions, then to handle
non-built-in functions with the same type as built-in functions. This will
catch standard library functions and mock them appropriately.

This change is an adaptation of one submitted by Erik Islo and Megan Chang.
TestCase's skipTest method unavailable before python 2.7

Blarg! The unit testing's skipTest method was a new addition in python 2.7.
This is especially pesky since skipTest alters the control flow of the tests
(raising an exception so we can place it in setUp methods).

Options are to either monkey patch support into our testing module (ick!) or
add a fallback everywhere we use skipTest. This change adds a best-effort skip
method to the runner, then leaves it to the caller to return out of the method
(reporting success for skipped tests).

Sucks, but best that we can do until we drop *both* python 2.5 and 2.6
compatability, which probably won't happen until we finally move to the 3.x
series.
Disable ANSI escape sequences in windows
Uses stem.util.system.is_windows() for platform checking in run_tests.py
Skip integ tests for util.system if pgrep is unavailable.

Since pgrep is used in setUp() of test.integ.util.system.TestSystem, all
test cases would fail if pgrep is unavailable in the current platform
(e.g. windows). We'll simply skip them for now.
Skip test_stop() in test.integ.descriptor.reader on Windows.
Implement stem.util.system.expand_path() on windows.
Skip two test cases in test.integ.descriptor.reader on windows.

The two test cases are test_load_processed_files_permissions and
test_skip_listener_read_failure. They both call os.chmod() to change
permissions of the test file, but on windows, you can only set the
file's read-only flag with it and all other bits are ignored. This
would cause tearDown() to fail since test files are read-only and
can't be removed, thus fail all the test cases.
Fixed test_skip_listener_unrecognized_type on windows.

This test case is included in stem.test.integ.descriptor.reader. Now it
allows both "image/png" and "image/x-png" types.
Fixed a bug in stem.util.system.expand_path that may introduce a trailing slash.