[PULL 02/27] io: separate freeing of tasks from marking them as complete