Fix version detection (setuptools and distribute)

The versions of `distribute`, `pip`, `setuptools` and `wsgiref` are
excluded from the output of `pip freeze`, however they do show up in the
output from `pip list`. This allows us to use a more general
implentation of parsing the output from `pip list` to get the current
version of all distributions.

Also removes a dependency on `grep`.

Distributions excluded from `pip freeze`:
/pypa/pip/blob/2ad8888901c041b8f9aacebb3a16d55bf631e867/pip/util.py#L372