fix getUncommittedEvents being used to also clear the uncomitted events

added the following methods to `AggregateRoot` and therefore to `EventSourcedAggregateRoot`:

- `hasUncommittedEvents`
- `clearUncommittedEvents`
@henrikbjorn thanks.