Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf
ssl: clear the OpenSSL locking function

We're freeing the memory which holds the locks so we must make sure that
the locking function doesn't try to use it.
ssl: separate locking init from general init

Extract the lock-setting functions into their own, as we cannot assume
that it's ok for us to set this unconditionally.
docs: explicitly document the threading caveats

Talk about sharing objects and error messages; but the most important
part is about what to do with the cryptographic libraries, which sadly
have to become to responsibility of the application.
Make config reading continue after hitting a missing include file.

For example, if you have

[include]
path = foo

and foo didn't exist, git_config_open_ondisk() would just give up
on the rest of the file.  Now it ignores the unresolved include
without error and continues reading the rest of the file.
netops: return GIT_ECERTIFICATE when it fails the basic tests

When we first ask OpenSSL to verify the certfiicate itself (rather
than the HTTPS specifics), we should also return
GIT_ECERTIFICATE. Otherwise, the caller would consider this as a failed
operation rather than a failed validation and not call the user's own
validation.
merge: talk about the merging state after git_merge()

Since it's not necessarily obvious, mention the merging state and how to
clear it.
remote: add a failing test for checking the current branch's upstream

When we update FETCH_HEAD we check whether the remote is the current
branch's upstream remote. The code does not check whether the current
refspec is relevant for this reference but always tries to perform the
reverse transformation, which causes it to error out if the refspec
doesn't match the reference.

Thanks to Pierre-Olivier Latour for the reproduction recipe.
remote: fix tagopt test

An anonymous remote wouldn't create remote-tracking branches, so testing
we don't create them for TAGS_ALL is nonsensical. Furthermore, the name
of the supposed remote-tracking branch was also not one which would have
been created had it had a name.

Give the remote a name and test that we only create the tags when we
pass TAGS_ALL and that we do create the remote-branch branch when given
TAGS_AUTO.
remote: unify the creation code

The create function with default refspec is the same as the one with a
custom refspec, but it has the default refspec, so we can create the one
on top of the other.
Clean up issues include.path issues found during code review.

* Error-handling is cleaned up to only let a file-not-found error
  through, not other sorts of errors.  And when a file-not-found
  error happens, we clean up the error.
* Test now checks that file-not-found introduces no error.  And
  other minor cleanups.
Make the Visual Studio compiler happy
Fix segmentation fault observed on OpenBSD/sparc64

A non-readable mapping of a file causes an access violation in
the pack tests. Always use PROT_READ to work around this.
Merge pull request #2684 from jacquesg/openssl-windows

Make the Visual Studio compiler happy
Merge pull request #2685 from libgit2/cmn/mmap-readable

Fix segmentation fault observed on OpenBSD/sparc64
Merge pull request #2680 from libgit2/cmn/invalid-cert-return

netops: return GIT_ECERTIFICATE when it fails the basic tests
Merge pull request #2683 from libgit2/cmn/remote-unify

remote: unify the creation code
Merge pull request #2661 from swisspol/2656

Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf
remote: check the relevance of the refspec when updating FETCH_HEAD

Before trying to rtransform using the given refspec to figure out what
the name of the upstream branch is on the remote, we must make sure that
the target of the refspec applies to the current branch's upstream.
Merge pull request #2679 from jfultz/missing-include

Make config reading continue after hitting a missing include file.