Python 3.x support

Support for Python 2 and 3 with the same codebase. All tests now pass on 2.7.4 and 3.3.1:

Python 2.7.4
------------------

1. --test-all --extra
Ran 150 tests in 13.658s
OK

2. --test-kit --extra
Ran 120 tests in 3.033s
OK

Python 3.3.1
------------------

1. --test-all --extra
Ran 150 tests in 14.564s
OK

2. --test-kit --extra
Ran 120 tests in 3.097s
OK