Implement an abstract base class `Stream` that all stream classes inherit from
This will improve type annotations in assignments as we can use ... -> Stream
instead of ... -> Any
. It might also help to reduce some duplicated code (to be verified).