[WIP] Refactor and test crypto_util. Wrap pyelliptic.

I am posting this so that no-one else wastes time doing the same task. Please don't review yet, I 'd like to simplify the code and add a couple of tests first.
That's exactly your task, since you understand the protocol much better than me.

I 'll explain a lot more in the description, when I am done.