avoid TB in nose tests if there is no tty

GitPython's git.util.get_user_id() calls os.getlogin(), which
throws an OSError if there is no tty:

    Traceback (most recent call last):
      File "/home/sandbox/test/functional/multiproject_tests.py", line 65, in setUp
        TitoGitTestFixture.setUp(self)
      File "/home/sandbox/test/functional/fixture.py", line 129, in setUp
        index.commit('Setting offline.')
      File "/usr/lib/python2.7/site-packages/git/index/base.py", line 887, in commit
        return Commit.create_from_tree(self.repo, tree, message, parent_commits, head)
      File "/usr/lib/python2.7/site-packages/git/objects/commit.py", line 303, in create_from_tree
        committer = Actor.committer(cr)
      File "/usr/lib/python2.7/site-packages/git/util.py", line 354, in committer
        return cls._main_actor(cls.env_committer_name, cls.env_committer_email, config_reader)
      File "/usr/lib/python2.7/site-packages/git/util.py", line 327, in _main_actor
        default_email = get_user_id()
      File "/usr/lib/python2.7/site-packages/git/util.py", line 120, in get_user_id
        username = os.getlogin()
    OSError: [Errno 25] Inappropriate ioctl for device

But GitPython also allows to avoid the call by setting
environment variable "USER" to anything other than "UNKNOWN".

Therefore we preempt GitPython by calling os.getlogin() ourselves.
If we have to rescue the exception, export the environment var to
avoid traceback.
add pep8 tests for syntax errors
add pep8 tests for deprecated python usage
add pep8 tests and fix whitespace errors and warnings
add pep8 tests and fix blank line errors and warnings
add pep8 tests for import errors
add pep8 tests and fix statement errors
add pep8 tests and fix redundant backslashes between brackets
add pep8 tests and fix lexical indentation for python3

These are the pep8 tests that break python3,
such as mixing tabs and spaces for indentation.

I ignored all the pep8 tests that seemed only stylistic,
such as "visual" indentation.

http://docs.python.org/3.3/reference/lexical_analysis.html
add unit tests and fix exception clause compatibility

Exceptions are now compatible with both python 2.5 and 3.3,
and we have unit tests to detect regressions.

The syntax for capturing exceptions changed in python 3, but
we need to continue supporting python 2.5 syntax since many
people use tito on RHEL 5, which has python 2.5.

http://docs.python.org/dev/howto/pyporting.html#capturing-the-currently-raised-exception
add unit test and module compatibility lib

Add modules compat lib to support both python 2 and 3, and
add unit test to detect regressions.

Tito uses two modules that have changed significantly between
python 2 and 3:

* commands module merged into subprocess module
* ConfigParser module renamed as configparser
add unit test and use print function for python3 compat

Python 3 does not have the print statement, so convert all
print statements to print functions and add an ugly duckling
unit test to detect regressions.
add python 3.3 to travis-ci build matrix
use explicit relative imports for compatibility

Explicit relative imports work on both python2 and python3.
Resolves error when running `python3 ./runtests.py test/function':

    ERROR: Failure: ImportError (No module named 'fixture')