TransactionChain: fix empty? check

For now, when a chain is empty, RuntimeError is raised.
DatasetInPool destroy: delete associated tasks

Delete entries from GroupSnapshot, DatasetAction and RepeatableTask.