implement open_memstream

this is the first attempt, and may have bugs. only minimal testing has
been performed.
2 files changed