ECKey -D test and light cleanup

A small enough PR, just some light fixes and cleanup before I submit the `Script` and `Transaction` refactor's.

I'll just inline some comments on the commits for anything not immediately obvious from the commit message.