Updating constructor and factory method for streams

Removed the size argument, and replaced it with an associative
array of options, including "size" and "metadata" that can be used
to add custom metadata to the stream.