std: Use rt::io and StringWriter for in-memory I/O in std::repr

Move repr to using rt::io::mem::MemWriter instead of the old io::Writer.