Fixed issue with caching and nested units of work

The bug would cause a nested unit of work to act on an older aggregate,
retrieved from the cache.
The cache is now updated right after the aggregate state is committed (and the
aggregate is in a state to handle new commands). This would also solve issues
where the aggregate is stored in an off-heap cache.

Issue #AXON-180 Fixed
Fixed issue with nested UoW and event ordering

The order of events were wrong when using 3 layers of nested events. When using
a cache, the events were also out of order when appending to the event store.
This is solved by registering nested UoW with the root UoW instead. The root
UoW maintains event publication order.

Issue #AXON-180 Fixed