Fix #693: Python 2.4 incompatibilities

BaseException didn't exist until Python 2.5.  Let's create a helper in
pyversion to check whether we're derived from BaseException on Python
2.5 or better, and just Exception on Python 2.4.
Fix #692: UnicodeDecodeError in xunit when capturing stdout and stderr

It turns out that `Xunit` was very mix-brained about how to formulate
the blocks ultimately used for generating the report.  In some parts,
the expectation was to put unicode strings into the blocks, and in
others it would insert encoded strings along with unicode strings into
the blocks.  It's the latter that was ultimately causing the issue.

In particular, `_quoteattr` would sometimes receive a unicode string,
and then it would get translated into UTF-8.  Then, it would get
inserted into a unicode string, which would cause Python to try and turn
the UTF-8 encoded string back into a unicode one, but it would default
to the ascii codec and fail.

This makes us use unicode everywhere, sometimes forcing the data into
unicode with replacement.
Centralize some unicode and exception helpers into pyversion.

While we're at it, teach format_exception() to use the new
exc_to_unicode() helper derived from work done in capture.py.
Fix #720: nose with detailed errors raises encoding error

In this case, the exception vector being passed in was a string that
contained encoded UTF-8 sequences.  It was being converted to unicode
implicitly, which was raising a UnicodeDecodeError because some bytes
were >= 128.  Make sure the exception string is converted to unicode
before trying to put the whole thing together.

Thanks to Guillaume Ayoub for the test case.
pyversion: try unicode() before stringifying in force_unicode()

In Python 3, just stringify the argument.  In all other Python
implementations, let's attempt to use unicode() first, and then fallback
to using str() and decoding.
pyversion: minor fixes to exc_to_unicode

In Python 3, just str() the argument and return.  In other Python
implementations, work a little harder to make sure that we return a
unicode string.
Merge pull request #724 from jszakmeister/fix-some-unicode-errors

Fixes some unicode errors/handling in several areas of Nose.

A special thanks to Thomas Kluyver (@takluyver) for all the reviews while getting this together.