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 pull request #2680 from libgit2/cmn/invalid-cert-return

netops: return GIT_ECERTIFICATE when it fails the basic tests