Modify truncate to use lo_truncate64. Use HAVE_LO64 define to use new lo_*64 methods. Check size of offset and length for versions without LO64.
Check server_version before using lo_*64 functions. If less tahn 9.3 old none 64bit functions will be use.
Fixed check for PG version

It would have failed in PostgreSQL 10.0.
Use ifdef instead of if to check LO64
Add the flag 'lo64' to the version if psycopg supports the lo_*64 api
Don't try and compile lo64 support on 32 bits Python

We can't fit more than 31 bits in a long anyway.
Fixed mismatched types in debug print
Guard against overflows when using the lo32 api

If psycopg supports lo64 but the server doesn't the user may pass values
that would overflow the api range, resulting in:

    lo.seek((2<<30))
    *** OperationalError: ERROR:  invalid seek offset: -2147483648

Also improved the error messages and guard against INT_MIN for negative
seek offsets.
Keep into account psycopg build in lo64 tests
Added documentation about the lo64 support