Reduce the usage of raw `char *` and `std::string` in a variety of
places where they weren't needed.
General notes:
- Anything used for output or reporting needs to be `StringRefNull`
- No additional strlen calls should be incurred beyond what was already
present
- Memory lifetime is still valid according to ASAN
Pull Request: https://projects.blender.org/blender/blender/pulls/137747