Add openssl to external packages and remove gnutls
workaround to allow MacOS to statically link openssl
Cherry-pick branch openssl into next

Review 2101 by @larkost
Closes #2676
Closes #2949