Drop debugging data at end of file
Calculate delay and stretch earlier

Calculate and store delay and stretch in the appropriate form to use
with srttool and mkvmerge. This removes the need for local variables.