TS-2372 Make ecdh CTX prototype follow SNI, and fix unused ctx on some platforms