Allow adding tasks for dependencies in TERMINATE_WAIT or TERMINATED state (e.g. cancelling tasks at EXECUTE state)
refactoring test framework plus adding some new tests
According to our IRC discussion ValidateContext doesn't extend CancellableContext anymore
 * ValidateContext doesn't offer cancel() anymore
 * task controller will transition from VALIDATE to ROLLBACK_WAIT if ROLLBACK_REQ is present
 * removing SEND_CANCEL_DEPENDENTS from ROLLBACK state
 * eliminating SEND_ROLLBACK_DONE event and introducing SEND_TERMINATED instead (to don't miss cancelled dependents notifications)
Eliminating EXECUTE_CANCELLED and replacing it with CANCEL_REQ persistent flag.

EXECUTE_CANCELLED flag is not presistent and so it is causing the following issue:
 * task1 is installed to transaction
 * task1 cancels at EXECUTE and moves to TERMINATE_WAIT, fires SEND_CANCEL_DEPENDENTS event
 * task2 is installed to transaction, depends on task1 (it missed SEND_CANCEL_DEPENDENTS event)
 * since EXECUTE_CANCELLED was not persistent flag, this installation of task2 is successful
   and task2 continues to execute. This is wrong, task2 have to be forced to cancel.
fixing copy/paste error
Fixing test suite reliability. It is possible that there are
not handled events in the executor when executor is shut down.
use MSCLogger to throw exceptions
Simplifying transaction state engine - eliminating good-for-nothing PREPARE_DONE, COMMIT_DONE & ROLLBACK_DONE transaction flags.
The transaction listener is always initialized with dummy NOTHING_LISTENER if user provided listener is null.
removing magic constants - use STATE_MASK everywhere
Always free transaction id when transaction is reverted or committed.
This will allow transaction id to be reused by other lately created transactions.
Access to transaction's state variable have to be synchronized