Move unpack_url to pip.download

This puts all unpack functions in the same place.
Cherrypicked from a commit of qwcode
Align unpack_http_url to unpack_file_url
pip.download: add docstring and log
pip.download: refactor and try to clarify

add _check_download_dir and _download_http_url to ease the understanding
of unpack_http_url and unpack_file_url functions
Merge pull request #1822 from xavfernandez/develop_moveunpack

Move unpack_url to pip.download