StreamHandle: only set non-null context

If the given context is null, just don't set it. And something else
will need to set the context after construction, in that case.