Setup ensure_pinned before marking as RString

This ensures that we see the dmwmb pointer and rstring ptr in sync in
another thread. Otherwise one could have been set while the other was
still not.
Add spec for IO#write return value with multibyte strings
Fix return value for IO#write
Add spec for IO.write with provided encoding
IO.write writes the encoded string for given encoding
Untag passing spec and add failing spec for 2.0