Python3 support, Issue 346

This is the fix for http://trac.xapian.org/ticket/346. I am not sure if that's all in that issue but postingsource test case is working now under threads.