Parameterize contains_nul for BytesContainer.
Simplify GenericPath::set_extension.
auto merge of #13395 : Ryman/rust/bytecontainer_impl_container, r=alexcrichton

Also some minor cleanup in Path related to this.