Add os::join_paths, make setenv non-utf8 capable
Add os::join_paths, make setenv non-utf8 capable

This commit changes `os` in three ways:

* It adds a `join_paths` function that is the converse to `split_paths`,
  easing manipulation of the `PATH` environment variable according to
  platform conventions.

* **Breaking change**: It changes `split_paths` to no longer drop empty paths, since they are
  meaningful to some shells (where they are synonymous with the current
  working directory).

* It changes `setenv` to take a `BytesContainer` rather than a `&str`
  value, since environment variables may have non-utf8 values on some
  platforms. Since `&str` is a `BytesContainer`, this is *not* a
  breaking change.

Along the way, it also refactors the `split_paths` function so that
`cfg` switches are applied internally (and the function header is given
only once). This fixes a bug: the doc comment had an example for only
one platform.

[breaking-change]

KokaKiwi/rust,XMPPwocky/rust,rprichard/rust,jbclements/rust,stepancheg/rust-ide-rust,robertg/rust,kwantam/rust,cllns/rust,XMPPwocky/rust,AerialX/rust-rt-minimal,AerialX/rust-rt-minimal,ktossell/rust,zubron/rust,defuz/rust,defuz/rust,mdinger/rust,kwantam/rust,zaeleus/rust,ejjeong/rust,zubron/rust,kwantam/rust,nham/rust,cllns/rust,kwantam/rust,zachwick/rust,pshc/rust,kimroen/rust,dinfuehr/rust,rprichard/rust,pshc/rust,victorvde/rust,mihneadb/rust,ktossell/rust,TheNeikos/rust,rprichard/rust,victorvde/rust,ebfull/rust,jashank/rust,seanrivera/rust,barosl/rust,aidancully/rust,mvdnes/rust,aidancully/rust,hauleth/rust,philyoon/rust,l0kod/rust,GBGamer/rust,GBGamer/rust,miniupnp/rust,omasanori/rust,kwantam/rust,graydon/rust,XMPPwocky/rust,jroesch/rust,mahkoh/rust,kimroen/rust,barosl/rust,nham/rust,dwillmer/rust,jbclements/rust,ejjeong/rust,nham/rust,P1start/rust,l0kod/rust,robertg/rust,pelmers/rust,GBGamer/rust,rohitjoshi/rust,l0kod/rust,GBGamer/rust,carols10cents/rust,victorvde/rust,erickt/rust,philyoon/rust,vhbit/rust,P1start/rust,dinfuehr/rust,richo/rust,pczarn/rust,ktossell/rust,AerialX/rust,nwin/rust,untitaker/rust,sae-bom/rust,sae-bom/rust,seanrivera/rust,carols10cents/rust,bombless/rust-docs-chinese,pshc/rust,aepsil0n/rust,erickt/rust,avdi/rust,rohitjoshi/rust,robertg/rust,0x73/rust,untitaker/rust,rohitjoshi/rust,krzysz00/rust,andars/rust,miniupnp/rust,carols10cents/rust,reem/rust,pshc/rust,defuz/rust,sae-bom/rust,pelmers/rust,defuz/rust,AerialX/rust,ruud-v-a/rust,jroesch/rust,avdi/rust,mdinger/rust,nham/rust,0x73/rust,kimroen/rust,hauleth/rust,untitaker/rust,aepsil0n/rust,hauleth/rust,AerialX/rust,robertg/rust,pelmers/rust,cllns/rust,0x73/rust,mvdnes/rust,mihneadb/rust,aneeshusa/rust,rprichard/rust,ejjeong/rust,zubron/rust,aidancully/rust,stepancheg/rust-ide-rust,zubron/rust,quornian/rust,untitaker/rust,GBGamer/rust,vhbit/rust,stepancheg/rust-ide-rust,ejjeong/rust,emk/rust,seanrivera/rust,AerialX/rust-rt-minimal,mdinger/rust,zubron/rust,philyoon/rust,ebfull/rust,dwillmer/rust,aneeshusa/rust,pczarn/rust,bombless/rust,KokaKiwi/rust,XMPPwocky/rust,mahkoh/rust,hauleth/rust,aepsil0n/rust,quornian/rust,l0kod/rust,omasanori/rust,barosl/rust,cllns/rust,omasanori/rust,andars/rust,l0kod/rust,dwillmer/rust,ruud-v-a/rust,richo/rust,mdinger/rust,nwin/rust,nwin/rust,krzysz00/rust,erickt/rust,victorvde/rust,jbclements/rust,jbclements/rust,ebfull/rust,quornian/rust,mahkoh/rust,bombless/rust,sae-bom/rust,sae-bom/rust,kwantam/rust,erickt/rust,carols10cents/rust,reem/rust,philyoon/rust,victorvde/rust,AerialX/rust,aneeshusa/rust,miniupnp/rust,kimroen/rust,graydon/rust,ktossell/rust,barosl/rust,gifnksm/rust,avdi/rust,graydon/rust,emk/rust,P1start/rust,ktossell/rust,carols10cents/rust,pelmers/rust,AerialX/rust,pshc/rust,philyoon/rust,untitaker/rust,vhbit/rust,erickt/rust,jbclements/rust,seanrivera/rust,nwin/rust,zachwick/rust,zaeleus/rust,jroesch/rust,gifnksm/rust,ktossell/rust,jashank/rust,dinfuehr/rust,robertg/rust,0x73/rust,miniupnp/rust,l0kod/rust,nwin/rust,bombless/rust,aneeshusa/rust,bombless/rust,rohitjoshi/rust,rprichard/rust,XMPPwocky/rust,krzysz00/rust,mvdnes/rust,mahkoh/rust,KokaKiwi/rust,zaeleus/rust,untitaker/rust,KokaKiwi/rust,aepsil0n/rust,miniupnp/rust,mvdnes/rust,emk/rust,AerialX/rust,bombless/rust,pczarn/rust,P1start/rust,KokaKiwi/rust,zachwick/rust,hauleth/rust,sae-bom/rust,emk/rust,omasanori/rust,richo/rust,pczarn/rust,miniupnp/rust,jashank/rust,P1start/rust,nwin/rust,jbclements/rust,miniupnp/rust,andars/rust,mdinger/rust,quornian/rust,jbclements/rust,zachwick/rust,mvdnes/rust,jroesch/rust,TheNeikos/rust,ruud-v-a/rust,pshc/rust,jashank/rust,mahkoh/rust,GBGamer/rust,P1start/rust,emk/rust,ruud-v-a/rust,erickt/rust,aidancully/rust,jashank/rust,richo/rust,stepancheg/rust-ide-rust,mihneadb/rust,richo/rust,pshc/rust,reem/rust,krzysz00/rust,hauleth/rust,mihneadb/rust,zaeleus/rust,ebfull/rust,krzysz00/rust,jashank/rust,zachwick/rust,aepsil0n/rust,rohitjoshi/rust,kimroen/rust,AerialX/rust-rt-minimal,zachwick/rust,pelmers/rust,AerialX/rust-rt-minimal,gifnksm/rust,jroesch/rust,barosl/rust,cllns/rust,aidancully/rust,miniupnp/rust,nham/rust,dinfuehr/rust,stepancheg/rust-ide-rust,jashank/rust,reem/rust,dwillmer/rust,avdi/rust,0x73/rust,ejjeong/rust,0x73/rust,ktossell/rust,0x73/rust,mahkoh/rust,pelmers/rust,TheNeikos/rust,erickt/rust,dwillmer/rust,jroesch/rust,richo/rust,aepsil0n/rust,pshc/rust,andars/rust,GBGamer/rust,avdi/rust,quornian/rust,jroesch/rust,seanrivera/rust,zubron/rust,vhbit/rust,graydon/rust,zubron/rust,cllns/rust,omasanori/rust,pczarn/rust,l0kod/rust,carols10cents/rust,mihneadb/rust,dwillmer/rust,l0kod/rust,kimroen/rust,XMPPwocky/rust,jroesch/rust,rohitjoshi/rust,ruud-v-a/rust,graydon/rust,emk/rust,AerialX/rust-rt-minimal,zubron/rust,andars/rust,stepancheg/rust-ide-rust,ebfull/rust,defuz/rust,stepancheg/rust-ide-rust,dwillmer/rust,zaeleus/rust,barosl/rust,dinfuehr/rust,mdinger/rust,dwillmer/rust,barosl/rust,krzysz00/rust,P1start/rust,kimroen/rust,robertg/rust,avdi/rust,vhbit/rust,zaeleus/rust,omasanori/rust,GBGamer/rust,graydon/rust,vhbit/rust,andars/rust,nwin/rust,jashank/rust,reem/rust,philyoon/rust,ruud-v-a/rust,aneeshusa/rust,emk/rust,defuz/rust,mvdnes/rust,mihneadb/rust,jbclements/rust,gifnksm/rust,reem/rust,gifnksm/rust,jbclements/rust,ejjeong/rust,gifnksm/rust,TheNeikos/rust,dinfuehr/rust,TheNeikos/rust,KokaKiwi/rust,vhbit/rust,aidancully/rust,vhbit/rust,victorvde/rust,TheNeikos/rust,pczarn/rust,pczarn/rust,nham/rust,nham/rust,quornian/rust,seanrivera/rust,rprichard/rust,ebfull/rust,aneeshusa/rust,nwin/rust,quornian/rust,bombless/rust