Remove compatibility workarounds for Python < 2.6

Patch by Martin Panter.
Make sure delta.py handles streams in binary string mode, so we can always use BytesIO
Convert URL from bytes to str for RemoteAccess
Use the next() function in test_ra
Use single parameter instead of tuple.
Streams should be compared to bytes
Use new exception handling syntax

Patch by Martin Panter.
Use int instead of long; use new octal literal syntax
Python 3 doesn’t have these file objects
Test that delta.apply_txdelta_window() and friends work

Patch by Martin Panter.
Line endings from diff() depend on the platform.

On Windows this test would fail because the computed diff has CRLF line
endings.
Factor common svn_log_message_receiver_t code into pyify_log_message()

Patch by Martin Panter.
Factor out ra_get_log_prepare() to share with get_log() and iter_log()

Patch by Martin Panter.
Factor common error cleanup code with goto

Should fix numerous leaks of APR pools, Python object references, and the RA
busy flag.

Patch by Martin Panter.
Add missing exception handling for PyString_FromString() calls

In Python 3 these will all involve UTF-8 decoding, which can easily trigger
exceptions for invalid UTF-8 data. For instance this happened when running
the tests and a commit was made with the “svn:log” string accidentally not
terminated. The string had random non UTF-8 data appended to it.

Patch by Martin Panter.
Partially port C modules to Python 3.1; drop Python 2 compatibility

py_stream_read and py_stream_write should operate on bytes because Subversion
accepts raw data.
Use BytesIO instead of StringIO
Remove compatibility workarounds for Python < 3

Patch by Martin Panter.
Adapt to splitup of “urllib” in Python 3
Adapt to Python 3’s dictionary view methods