Extract some utilities from git-svn to allow extracting Git::SVN.

Put them in a new module called Git::SVN::Utils.  Yeah, not terribly
original and it will be a dumping ground.  But its better than having
them in the main git-svn program.  At least they can be documented
and tested.

* fatal() is used by many classes.
* Change the $can_compress lexical into a function.

This should be enough to extract Git::SVN.

Signed-off-by: Michael G. Schwern <schwern@pobox.com>
Prepare Git::SVN for extraction into its own file.

This means it should be able to load without git-svn being loaded.

* Load Git.pm on its own and all the needed command functions.

* It needs to grab at a git-svn lexical $_prefix representing the --prefix
  option.  Provide opt_prefix() for that.  This is a refactoring artifact.
  The prefix should really be passed into Git::SVN->new.

* Unqualify unnecessarily fully qualified globals like
  $Git::SVN::default_repo_id.

* Lexically isolate the class just to make sure nothing is leaking out.
Extract Git::SVN from git-svn into its own .pm file.

Except for adding the 1; at the end, this is a straight copy & paste.

Tests still pass, but its doubtful Git::SVN will compile on its own
without git-svn being loaded.  Next commit will fix that.
Move initialization of Git::SVN variables into Git::SVN.

Also it can compile on its own now, yay!
Extract Git::SVN::Log from git-svn.

This is a straight cut & paste.  Next commit will make it work.  This will
make it easier to see the differences in Git::SVN::Log.
Make Git::SVN::Log work.

Changes to Git::SVN::Log to make it compile....
* Change the $_git_format lexical only used by Git::SVN::Log into a Git::SVN::Log global
* Have it load the Git command functions itself
Move Git::SVN::Migration into its own file.

Just a straight cut & paste, the fixes come next commit.
Fix Git::SVN::Migration after its move.

Also...
* eliminate the big "import all the Git command functions" loop, nothing needs it
  any more
* only load Git::SVN::Migration if we need it
Cut & paste Git::IndexInfo into its own file.

No other changes, those are next commit so they can be seen in the diff.
Fix Git::IndexInfo so it compiles.

Only used by Git::SVN::Fetcher.
Cut & paste Git::SVN::GlobSpec into its own file.

Fixes to make it work come next commit.
Fix Git::SVN::GlobSpec so it works.

Only used in one place in Git::SVN, load it on demand.

That should be all the Git classes out of git-svn.
Change git-svn's main canonicalization routines to use the SVN API.

SVN 1.6 and 1.7 have different APIs, so check what's available.

For #1
Don't modify the path if Git::SVN has no path set.

Otherwise "foo" becomes "/foo".  Previously the custom canonicalization
seemed to have special code to deal with this gaffe, but that's gone.
Make Git::SVN::Ra->get_dir work with the new canonicalization.

SVN::Ra->get_dir has some special requirements that the SVN canonicalization doesn't
handle.  It doesn't like "foo/.." and it doesn't like a bare ".".

I don't know yet how widespread this problem is, so it's restrained to get_dir()
for now.
Remove an unused lexical.
Replace the hand rolled escape functions in git-svn with the canonicalization functions.
Make Git::SVN use accessors internally for path.

This is so it can canonicalize it both on initialization and if the path
is set.

I've also identified locations of ad-hoc canonicalization for later removal.

For #3
Change the rest of the code to use Git::SVN->path instead of the hash directly.

For #3
Add Git::SVN->url and make Git::SVN use it internally.

This will allow universal canonicalization later.

For #3.