implement "pip self-check" with automatic invocation by default

initial work cribbed from PR #1214 but then I changed direction a little
Let's use `sys.prefix` here instead of checking the environment again.