Improved Python 3 compatibility

This patchset fixes most print calls to be compatible with python 3. Some are switched entirely to print_function.
Also drops L-syntax for int literals in storage.

The setup.py build script is also fixed for full 3.x compatibility.