The goal of this refactoring is to better encapsulate internals of the ecdsa library in a single module (in anticipation for removing that dependency later), and improve the general code quality.
The `ECKey` class is renamed into `ECPrivkey` and now inherits `ECPubkey`. The code of the ECPrivkey is massaged into a better shape. The constructor now checks that the key is exactly 32 bytes, and for creating a key from a shorter amount of data (used for wallet file encryption) a special classmethod `from_arbitrary_size_secret` is introduced with the previous behavior of normalizing the shorter key data to 32 bytes.
The `MySigningKey` class, which is a wrapper around `ecdsa.SigningKey`, is now an implementation details of ecc.py, and is no longer used in transaction.py and unit tests.
This diff is a big chunck of what remains to be split out of D16301.
Depends on D16678