compiler: rust: add a Rust memstream abstraction
This is useful when interfacing with C code in situations where a FILE* is needed.
Notably, we already had such an abstraction in NAK, but this one now plugs into the existing u_memstream instead.
A fmemopen() abstraction is also provided, as requested by @austriancoder.