Raw.xs: support returning strings from callback

For callbacks, cannot use a plain string as a return value because
the data pointed to by the string pointer will be free'd by Perl
before it gets to the C code.  Instead use a reference to a string,
which (if not anonymous, which we also check for), it will last
at least long enough to make it to the C code.  The user still needs
to make sure the reference in Perl outlasts the usage in C, but
well behaving C code should copy the string buffer if it needs to
keep it anyway.