replace int with size_t in stream methods

Thus the read(...) and write(...) methods of all stream classes now have identical parameter lists.
This will bring these classes one step closer to a common interface.
Merge pull request #4706

8695a39 replace int with size_t in stream methods (Kamil Domanski)