Machinery for versioned releases

WIP of necessary script to prepare releases.
> Publishing ought to be a separate step. [..and..]
> I can forsee circumstances where we may want to re-run the release script for a release that is already up there.

That makes sense. So perhaps it can be two steps: one to prepare release artefacts, and one to publish a release. Now, it would be nice if the publication could only happen if the release passes all the tests and so on, so possibly the publish step should run the tests as well as doing sanity checks (e.g., making sure there's not already a release of the given version).