Added function to cast &[u8] to &str

Added str::from_bytes_with_null
Added str::subslice_offset
Misc cleanup

Closes #5422