THRIFT-2757: py - checkIntegerLimits optimized

Client: Python