Re #6494. Enable cancellation in case of erroneous input.

If the user inputs a log with a large range, print a warning and add
progress reporting and a couple of bonus spots where the algorithm can
be cancelled.
Re #6494. Handle variable deletion in a better way.