#22512: move distutils rpm test's .rpmdb to testing tmpdir.

Patch by Francis MB.
use Py_ssize_t for file offset and length computations in iteration (closes #22526)
this test will only work on 64-bit machines
allow longs as indexes to group() (closes #22530)