Remove Python 2.5 support

Even if the goal is to support hostile environments, it's becoming hard
to find systems still having it.
Style fixes
Not required for 2.6+
Modernize the code for 2.6+

Might even work with Python 3, but not tested