Restore pad to new location at a given revision

This script gives an admin with shell access the ability to restore a
pad at a given revision by essentially rebuilding it at a new location
using its data.  The upsides to creating a new pad, rather than changing
the original, are: 1) avoiding service disruptions (no deletes, builds
from a previous revision); 2) preservation of data (no deletes, no
overwriting of the source pad).  The downside is the pad has a new ID,
which will require refreshing links, bookmarks, etc.