implement "pip self-check" with automatic invocation by default with initial
work cribbed from PR 1214