add ECC support in configure

Copied from GOST but with tests.
This branch will be merged to ecdh branch and the WITH_ECC flag used.