[Sanitizer] Get rid of unnecessary allocations in StripModuleName. NFC.