ctest_submit: fix https upload to CDash
This MR fixes a bug that prevented
ctest_submit(CDASH_UPLOAD) from successfully submitting to a CDash site with a valid HTTPS certificate.
It also modifies the behavior of
ctest_submit(HTTPHEADERS) to only print such headers to the console when ctest is called with
--debug. This is in order to prevent accidentally leaking private bearer tokens.