Require an unsafe block to modify a string

In the rust manual, one of the definitions of unsafe behavior that the compiler
disallows is allowing non-UTF-8 byte sequences in a string, so this fixes the
compiler to actually do its job in enforcing this invariant.

Closes #8891
auto merge of #9750 : alexcrichton/rust/safer-strings, r=brson

In the rust manual, one of the definitions of unsafe behavior that the compiler
disallows is allowing non-UTF-8 byte sequences in a string, so this fixes the
compiler to actually do its job in enforcing this invariant.

Closes #8891