(#6527) Fix uninstall problem and refactor
Uninstall wasn't working properly because the instances method relied on
the pip command having been defined by calling lazy_pip. This lazy_pip
pattern is a nice way of getting around Puppet's problem of
disqualifying providers at the beginning of a run because the command
doesn't yet exist even though part way through the run the command might
exist.
Really, we need to fix puppet to lazily evaluate a provider
command for validity only at the time the provider is needed.
The refactoring also pointed out that query could just reuse the logic
from instances.
The tests were also refactored to use real resources instead of stubbed
ones, and they reflect the implementation changes to instances.
Paired-with: Richard Crowley <r@rcrowley.org>