Modernize `check_pants_pex_abi.py` script to Python 3 (#7631)
Modernize `check_pants_pex_abi.py` script to Python 3 (#7631)

Because we're guaranteed to have Py3 on all wheel building shards, we can refactor this script to use modern Python 3 for improved code and to prepare for removing Python 2 from CI.

Makes these refactors:
* Use type hints to allow scanning function signatures more easily.
* Use f-strings, but only where more readable.
* Remove unnecessary `__future__` import.
* Remove unnecessary file encoding header, since Python 3 assumes source files are UTF-8.
* Use modern `pathlib` library for object oriented interface (see [PEP 428](https://www.python.org/dev/peps/pep-0428/#why-an-object-oriented-api))
pantsbuild/pants,twitter/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,wisechengyi/pants,twitter/pants,pantsbuild/pants,tdyas/pants,wisechengyi/pants,wisechengyi/pants,tdyas/pants,twitter/pants,tdyas/pants,tdyas/pants,benjyw/pants,benjyw/pants,tdyas/pants,pantsbuild/pants,wisechengyi/pants,benjyw/pants,wisechengyi/pants,pantsbuild/pants,twitter/pants,wisechengyi/pants,wisechengyi/pants,jsirois/pants,jsirois/pants,twitter/pants,tdyas/pants,tdyas/pants,benjyw/pants,pantsbuild/pants,jsirois/pants,benjyw/pants,wisechengyi/pants,twitter/pants,tdyas/pants,twitter/pants,pantsbuild/pants,twitter/pants,twitter/pants,wisechengyi/pants,tdyas/pants