Clean up ScriptExecutionContext::Task and subclasses