python: better Python compilation portability. This change is per automake thread: https://lists.gnu.org/archive/html/automake/2022-09/msg00002.html * lib/py-compile: Test directly for availability of importlib.util.cache_from_source. Untangle logic for when to generate -O and -OO bytecode. Reformat embedded Python fragments.