Fix race conditions

Fix race conditions accessing stream map and framer.  A slight interface update was also necessary to allow for avoiding race conditions between opening a stream and storing a reference a to a stream.