stdlib pkg exclusions for pip list/freeze

a redo of #1577 for develop branch

excludes wsgiref and argparse from pip list and freeze

contains some refactor to isolate the python version variation into the compatibility module.