more graceful handling of UTF-8 encoding errors (though this is really a hack, for some
odd reason the JVMTI GetThreadInfo() function sometimes yields a garbled thread name....)