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: 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.
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