Factor get_dist implementation out of InstallRequirement
Factor get_dist implementation out of InstallRequirement

With it outside of the class body and taking primitive values, this
should be easier to move into a separate module.

pfmoore/pip,sbidoul/pip,pfmoore/pip,pradyunsg/pip,xavfernandez/pip,xavfernandez/pip,xavfernandez/pip,pradyunsg/pip,sbidoul/pip,pypa/pip,pypa/pip