Fix numeric truncation issues in python bindings

Integer attribute values on features which fall outside the 32 bit range currently get truncated by the python bindings. The first patch here fixes that and the others tidy up knock on changes in the tests.

The overall result is five fewer failures in the python tests on 32 bit platforms.