Fix things up for a 1.1 release

This branch is not a descendant of the current master.  What I actually think I want to do is revert all that old branch I merged, then rebase this on top of that.

Anyway, currently the pull is mostly for checking the specs.

Highlights
* nicer looking specs
* a lot of crypto primivite API
* Some useful APIs for e.g. nonce length