memstream: use a single implementation
We don't need to maintain 2 different implementations of the same thing. The system version is likely not faster/more efficient than ours.
We can also reduce the size of the structure while doing so.
And that's one less function to test during configure.
Edited by Steve Lhomme