Drastically refactor for readability.

peep_install() had grown far too much local state, and even I couldn't figure out what was going on anymore. By turning all the data structures inside out and encapsulating everything within each requirement (rather than having a bunch of hashes and sets off to the side), we reduce the number of locals in peep_install(), reduce the number of `for` loops down to one (rather than repeating them in each utility function), and surface the patterns that have emerged, such as various kinds of failure printing a header, a series of errors, and a footer.

* Temporarily break tests.
* Bump version to 2.0, both for the significance of the code change and for the upcoming backward-incompatible changes.
* Temporarily (or forever?) ignore command-line args during package downloading.
* Catch a conceivable race condition in which additional files get added to the temp dir. Probably wouldn't happen since it's not linked anywhere, but hey, it's security software.
Copy and paste in prepare_files() from pip, and annotate it a bit.
Give each requirement its own temp dir.

This closes a potential security hole in which 2 requirements have the same filename, one matches its hash and the other doesn't, but the non-matching one got created later and thus gets installed. This was not an issue in pre-2.0 versions of peep in which all files were downloaded, and then all hashes were checked.
Committing before replacing requests-based code with urllib2.

requests wasn't introduced until pip 1.5, and we obviously need to work with older pips. I'd rather have 1 code path than different behaviors with different pips.

peep runs without crashing on satisfied requirements. It doesn't get through installable ones yet.

* Remove kwarg calling convention from pip.main(); in some versions, it's not a kwarg.
* Pare down _downloaded_filename() to about the bare minimum.
* Teach peep how to call into just the pip parts that find the URL to download. Everything else download-related we'll do ourselves.
Reimplement downloading based only on urllib2, since requests is in pip's vendor lib only in 1.5 and later.

* Remove support for HTTP proxies and basic auth. If anybody needs them, they can submit a patch.
* Make errors presentable.
* Stop buffering output for now. The out-of-orderness problems seem to have gone away now that I don't call pip's noisy download routines anymore.
"deepcopy" pip's arg parser so it doesn't wreck itself the first time we call it.

This fixes the bug wherein pip would (unsafely) redownload a package even though peep had already done so.
Delete obsolete comments, and make a few tweaks for clarity.

This covers mythmon's feedback.
Bump version to 2.0.
Fix a minor crasher.
Fix memoize() function.

It was getting overzealous and caching beyond the scope of a single instance.
Rewrite old unit tests, and add tests to cover most of the rest of the project.

Noted deficiency: we don't cover the branch of DownloadedReq._download() that deals with local files. I'm not sure how to trigger it.

Refactor a little for testability: specifically, so I can get ahold of the DownloadedReqs to assert things about them.
Mention test coverage in readme.
Add generative tox config for testing against all supported pip versions in addition to Python versions.
Replace check_output with check_call, as the former doesn't exist in Python 2.6.
Remove empty formatting braces which bother 2.6.
Look for url_to_path() in various places for old pips.
Keep pip 0.7 from freaking out when installing the test package.

It said "Directory 'useless' is not installable. File 'setup.py' not found." To fix that, we change our HTTP server to not have to be in the tests/packages/ dir to serve files from there. Then pip doesn't get confused.

Also introduce a manual way to run the test server, handy for debugging.
Make install_from_string() a class method.

It doesn't need any instance-dwelling stuff.
Make more ports available for the test server.

Running all those tox environments, we ran out.
Support pip 1.3.0's InstallCommand constructor arg.