fix getUncommittedEvents being used to also clear the uncomitted events

added the following methods to `AggregateRoot` and therefore to `EventSourcedAggregateRoot`:

- `hasUncommittedEvents`
- `clearUncommittedEvents`
You dont write a test asuming it could fail, you write a test assuming it __does__ something.