removal of LegacyVersion broke ax_python_dev.m4
The 22.0 release of the python packaging package removed the
LegacyVersion trait, causing ZFS to no longer compile.
This commit replaces the sections of ax_python_dev.m4 that rely on
LegacyVersion with updated implementations from the upstream
autoconf-archive.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #14297