Added logging in replay loop.
Removed extra yield keyword by making repository more stateful; same for projection sample.
Revised sample to follow Apply/Append pattern.
Added TODO for clean shutdown.
Don't serialize (for storage) an empty header collection.