Extract WaitForStream function

The wait code from the example app is quite helpful -- This PR give users of
the library an opportunity to leverage it without duplicating into their own libraries.

* Extract WaitForStream function

Minor changes

* Add short-circuit on CreateStream if it already exists
* Move the Get records to bottom so it fetches all the records
* Update the batch put so the records are distinguishable from single puts