Issue #22696: Add function :func:`sys.is_finalizing` to know about interpreter shutdown.