Merge pull request #821 from google/deleterace

Add openSharedStream() to prevent deletion while executing onError callbacks