clone: perform a "local clone" when given a local path

When git is given such a path, it will perform a "local clone",
bypassing the git-aware protocol and simply copying over all objects
that exist in the source.

Copy this behaviour when given a local path.
clone: store the realpath when given a relative one

A call like git_clone("./foo", "./foo1") writes origin's url as './foo',
which makes it unusable, as they're relative to different things.

Go with git's behaviour and store the realpath as the url.
clone: add flags to override whether to perform a local clone
clone: add flag not to link
fileops: allow linking files when copying directory structures

When passed the LINK_FILES flag, the recursive copy will hardlink files
instead of copying them.
clone: allow for linking in local clone

If requested, git_clone_local_into() will try to link the object files
instead of copying them.

This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
clone: more explicit local tests

Assert the exact amount of links we expect. While there, check that a
plain git_clone() automatically chooses to link.
Merge pull request #2011 from libgit2/cmn/clone-local

Local clone