bpo-46020: Optimize long_pow for the common case (GH-30555)

This cuts a bit of overhead by not initializing the table of small
odd powers unless it's needed for a large exponent.
1 file changed