The old code was rather formulaic and ripe for some abstraction. The
new version is built out of some slightly hairy macros; the prototype is
in `udpkey'. There is a small reduction in the raw size of the code,
but the main benefit is the better factoring.
Setting up of the public key slot `kd->kpub' is now done by the
individual methods rather than in `loadpriv'. This makes it possible to
keep the on-error-cleanup code common between the private and public
key-loading methods, so we only need a single copy of the boilerplate.
There's still only one copy of this code in the source.