Machinery for versioned releases

WIP of necessary script to prepare releases.
http://stackoverflow.com/a/11355611/717998