winhttp: credential check on successful connect

On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
winhttp: only do certificate check for SSL

If we're not using SSL, don't call the user's certificate check callback.
winhttp: bring together request sending

We need to call WinHttpSendRequest() in three different places. Unify all in a single function to have a single place for the certificate check.
winhttp: set ignore security flags on user command

If the user returns 0 from the certificate check and we had certificate issues, set the options to ignore certificate errors and resend the request.
transport: move the cert type enum to types.h

This should make the mingw compiler happy.