Self-terminating job flows

It works! This implements #628 with a bootstrap action written in Bourne Shell.

In the process, I fixed #658 and #621.