context: Support specifying a list of curves
context: Clean up setcurve type handling
context: Fix leak of EC_KEY in ecdh_cb