Extracted the event management portion of the TransactionIterator

Extracted the event management portion of the TransactionIterator into a trait, since the logic there could be reused both in the [`MessageFactory::add_events()` method](https://github.com/guzzle/guzzle/blob/master/src/Message/MessageFactory.php#L298-L325) and by Guzzle consumers (e.g., AWS SDK).

Let me know if you like this approach or not and if you'd like to rename anything.