ISPN-4565 ReplTotalOrderVersionedStateTransferTest.testStateTransfer ran...

...dom failures

* fix NPE:CommitCommand should not trigger the PrepareCommand.
* fix timeout: CacheTopologyControlCommand should be processed in the deliver thread

https://issues.jboss.org/browse/ISPN-4565
It may be worth replacing it with `if (trace)`, as the `isTraceEnabled()` check itself can be expensive with log4j. 
Otherwise I agree with Sanne that calling `if (isTraceEnabled())` doesn't help most of the time.