consensus lib work: split ec openssl wrapper into separate files

This unchains CKey/CPubKey from openssl and will allow us to use EC functionality from script without depending on anything else.

Upcoming PR's will take advantage of this, I've split it up for the sake of review sanity. I can add those here if it would be preferred though.