Add _opt variants to str byte-conversion functions

Add _opt variants to from_bytes, from_bytes_owned, and from_bytes_slice.
These variants return an Option instead of raising a condition/failing.
auto merge of #8750 : kballard/rust/str-opt-variant, r=thestinger

Add _opt variants to from_bytes, from_bytes_owned, and from_bytes_slice.
These variants return an Option instead of raising a condition/failing.