py: Fix check of small-int overflow when parsing ints.

Also unifies use of SMALL_INT_FITS macro across parser and runtime.