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.