Run refactoring test using py.test

refactor.collect_file_tests is fixed;  it uses global variable
refactoring_test_dir which is not defined when refactor is used
as a module.
Fix test_refactor

It was not run because test cases were collected from test/complete
instead of test/refactor.
Run py.test in tox.ini
Fix tests for Python 3.2 (use relative import)
Rename regression.py to test_regression.py

in order to let py.test collect the tests.
Ignore first N failures in Python 2.5
Better assertion message formatter
Use tox in .travis.yml
Avoid NoSSLError in Python 2.5
Install ssl in .travis.yml
Use --insecure when running pip with Python 2.5
Install libssl-dev for Python 2.5
Install libbluetooth-dev for Python 2.5
Use PIP_INSECURE=t
Run py.test in clean cache directory

And finally remove XDG_CACHE_HOME=... in tox.ini.
Workaround test failure due to cache in Python 3.2
Add a failing test due to import hack
Remove old test code
Remove old utility functions in test.base
Fix test failures because imports.py uses base.py