Use multiple temporary files to do each step

The encoding conversion step uses a temporary file just for itself.
Adjust delay and renumber entries

Both these operations are done by srttool. The tool doesn't support long
options. The -r flag turns on renumbering and the -d flag accepts a
delay in seconds. The output is written out to stdout.

In order to calculate the delay in seconds for srttool, I've used awk
instead of bc, as awk is more likely to be installed.
Handle srttool failures

Since srttool writes its output to stdout, shell redirection is used to
overwrite the original file. So, if srttool fails, the redirection has
the unfortunate side effect of wiping out the original file.

The script will now avoid that scenario by trying to copy the original
file back.
Failure to overwrite file after encoding change handled
Fix bug in delay/numbering adjustment

Mix up of input and output files. Sorted now.
Implement stretching of time intervals between entries

The srttool from the transcode package only allows stretching up to 60
seconds over 3600 seconds. This is an unnecessary limitation. Instead,
using mkvmerge/mkvextract from the mkvtoolnix package, arbitrary stretch
factors can be used. In essence, we're encoding an mkv file with nothing
but a subtitle and extracting the subtitle out.