DetectionTask.java: refactored redundant code, implemented a nexted
abstract class DetectionSubTask containing a method parentCancelled()
that returns true if the DetectionTask is marked as cancelled by the
ProgressWindow UI abort button component, migrate DetectionTask child
SwingWorkers to extends DetectionSubTask and strategically inserted
calls to parentCancelled() such that the subtasks will return null if
their parent DetectionTask is marked cancelled.