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.
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: 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.
git_remote_rename: propogate GIT_ENOTFOUND
Merge pull request #2686 from ethomson/rename_notfound

Propogate GIT_ENOTFOUND from git_remote_rename