consensus lib work: split stream classes out of serialize.h

serialization now has no dependencies.
Thanks for moving these to a separate include file. Indeed, they don't belong with serialize itself.