Fix zip files to find the root more correclty

If the root doesn't happen to be the first entry in the zip file this fails to pick the correct root.  Instead we just find all folders with no subfolders and pick the first one.
Support git URL as an installation target.
Cherry-picked from https://github.com/miyagawa/cpanminus/pull/165/commits

TODO:
* Support extract configure_requires from cpanfile
* Add git-URL from 02packages and/or cpanfile
Merge pull request #193 from oalders/devel

Use versioned MetaCPAN URL.
Added a test for mirror with undef version
Do not assume mirror-only even when index file is supplied. Fix for Carton to fallback MetaCPAN.
take VERSION from cpanminus.pm
Checking in changes prior to tagging of version 1.59_06.

Changelog diff is:

diff --git a/Changes b/Changes
index 063fdfd..202ee19 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,12 @@
 See http://github.com/miyagawa/cpanminus/ for the latest development.

+1.59_06 Tue Feb  5 12:36:00 PST 2013
+   [Incompatible Changes]
+      - --mirror-index option doesn't automatically assume --mirror-only
+
+   [Improvements]
+      - Use versioned MetaCPAN API endpoint (oalders)
+
 1.59_05 Mon Feb  4 11:49:40 PST 2013
    [New Features]
       - Support version ranges in command args and cpanfile queried agsinst MetaCPAN
Search only stable releases (unless specified, with commits coming later)
Disable automatic skip-satisfied for arguments with version range.

Carton always pass --skip-satisfied when necessary, and doesn't need
automatic enabling of this option.
Retire search.cpan.org search!
Update the doc to reflect the change of not using s.c.o anymore
Explicitly pass skip-satisfied
Enable metacpan support by default.

MetaCPAN is by default queried after cpanmetadb since cpanmetadb can
serve requests much faster without doing a complicated index lookup,
but is preferred when given a version requirements, since only
MetaCPAN can serve such requests.

--metacpan option is undocumented but keeps captuting the option to
make it backward compatible.
Implemented --dev option
Add test for --dev option
Don't use -L in tests when it's not necessary
refactor -L local_lib in tests into run_L utility function
Checking in changes prior to tagging of version 1.59_07.

Changelog diff is:

diff --git a/Changes b/Changes
index 202ee19..a7477e9 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,20 @@
 See http://github.com/miyagawa/cpanminus/ for the latest development.

+1.59_07 Wed Feb  6 11:08:05 PST 2013
+   [Incompatible Changes]
+      - Disable implicit --skip-satisfied auto conversion with version specification
+      - Do not fallback to search.cpan.org scraping anymore. This means some of the bogus
+        search that doesn't match package name on PAUSE but returns a hit on search.cpan.org
+        can't be installed anymore. You have to use the right package name for it.
+      - Enable MetaCPAN search by default. --metacpan option is deprecated
+
+   [New Features]
+      - EXPERIMENTAL: --dev option to enable including developer release for searching
+        against MetaCPAN
+
+   [Improvements]
+      - Improve MetaCPAN query to search stable releases, unless developer release is requested
+
 1.59_06 Tue Feb  5 12:36:00 PST 2013
    [Incompatible Changes]
       - --mirror-index option doesn't automatically assume --mirror-only
Fix --dev so that we prioritize metacpan for real
Checking in changes prior to tagging of version 1.59_08.

Changelog diff is:

diff --git a/Changes b/Changes
index a7477e9..d8b0cfe 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 See http://github.com/miyagawa/cpanminus/ for the latest development.

+1.59_08 Wed Feb  6 11:25:45 PST 2013
+   [Bug Fixes]
+      - Prioritize MetaCPAN when --dev option is enabled, for real
+
 1.59_07 Wed Feb  6 11:08:05 PST 2013
    [Incompatible Changes]
       - Disable implicit --skip-satisfied auto conversion with version specification