Forbid modifications of strings in the compiler

This disallows `str[0] = foo` along with `foo = &mut str[i]` to prevent strings
from being modified at runtime (except possibly through the `str` module)

Closes #8891