fix a s/non-utf8/is-utf8/ bit of nastiness
Commit
3e462cdc2087ddf90984010fabd80c30db92bfa0 provided a fix
for the s/non-utf8/is-utf8/ case by upgrading TARG to UTF8 after the
match, but before the substitution. It used sv_utf8_upgrade() rather than
sv_utf8_upgrade_nomg(), so for example, with a tied variable, FETCH would
get called again, and all the char* pointers such as s would be left
dangling. If the length of the string was unchanged, the code wouldn't
notice this.
Fix by using the _nomg() variant, and by checking whether the string
has been reallocated