begin and end stream transitions

Added in the begin and end stream transitions. Also added stream releated interfaces to SubProcess but have to wait until global module interface is available before we can implement those methods.