Stamp each stream message with id

ids are unique and incrementing
Method:
 - lock the stream,
 - increment a counter,
 - stamp the message with the counter value,
 - push to list and publish,
 - release the lock
 - if cannot lock now, wait until lock is released or expired