Fix inconsistency in *Children count fields, for both Transaction and TaskControllerImpl.

Some of these fields are being decremented more than once, which will result in negative indexes and can cause behavior problems when cancelling a task with forceCancel.