git_branch_set_upstream with local branches

Currently git_branch_set_upstream when passed a local branch
creates invalid configuration, for ex. if we setup branch
'tracking_master' to track local 'master' libgit2 generates
the following config

```
[branch "track_master"]
  remote = .
  merge = .refs/heads/track_master
```

The merge value is invalid and calling git_branch_upstream on
'tracking_master' results in invalid reference error.

It should do:

```
[branch "track_master"]
  remote = .
  merge = refs/heads/master
```
Add git_commit_owner to the public interface

Just like git_tree_owner, etc.
Merge pull request #1553 from jdavid/git_commit_owner

Add git_commit_owner to the public interface
Fixed qsort_r() problem when targeting AmigaOS.

We fall back to the libgit2-provided insert sort as done for other
platforms.
Merge pull request #1554 from sba1/sort-amiga-fix

Fixed qsort_r() problem when targeting AmigaOS.
Merge pull request #1551 from nvloff/set_upstream_local_branch

fix git_branch_set_upstream for local branches
Add GIT_DIFF_LINE_CONTEXT_EOFNL

This adds a new line origin constant for the special line that
is used when both files end without a newline.

In the course of writing the tests for this, I was having problems
with modifying a file but not having diff notice because it was
the same size and modified less than one second from the start of
the test, so I decided to start working on nanosecond timestamp
support.  This commit doesn't contain the nanosecond support, but
it contains the reorganization of maybe_modified and the hooks so
that if the nanosecond data were being read by stat() (or rather
being copied by git_index_entry__init_from_stat), then the nsec
would be taken into account.

This new stuff could probably use some more tests, although there
is some amount of it here.
More tests for files with no newline at end
Improve diff function docs
Fix line numbering for patches with eofnl

When a patch contained an eofnl change (i.e. the last line either
gained or lost a newline), the oldno and newno line number values
for the lines in the last hunk of the patch were not useful.  This
makes them behave in a more expected manner.
Merge pull request #1556 from arrbee/diff-patch-fixes

Diff patch bug fixes
remote: correctly interpret tagopt '--tags'

When tagopt is set to '--tags', we should only take the default tags
refspec into account and ignore any configured ones.

Bring the code into compliance.
Fix win32 type warnings
Merge pull request #1557 from carlosmn/tagopt

remote: correctly interpret tagopt '--tags'
Added SSH public key authentication
Fixed compilation issues when libssh2 is missing
Added libssh2 cmake module
Merge remote-tracking branch 'origin/development' into ssh_transport
Added ifdef
repo: unconditionally create a global config backend

When a repository is initialised, we need to probe to see if there is
a global config to load. If this is not the case, the user isn't able
to write to the global config without creating the backend and adding
it themselves, which is inconvenient and overly complex.

Unconditionally create and add a backend for the global config file
regardless of whether it exists as a convenience for users.

To enable this, we allow creating backends to files that do not exist
yet, changing the semantics somewhat, and making some tests invalid.