Convert between JS and Rust strings in a way that handles Unicode
Convert between JS and Rust strings in a way that handles Unicode

This doesn't handle invalid UTF-16 and may not be efficient.  It's just a small
change to make things better until we decide what we're doing about strings in
the long run.

Fixes #1068.

Adenilson/prototype-viewing-distance,karlito40/servo,avadacatavra/servo,deokjinkim/servo,Adenilson/prototype-viewing-distance,rnestler/servo,srbhklkrn/SERVOENGINE,Aalhad/CanvasRenderingContext2DMozilla,pgonda/servo,juzer10/servo,jlegendary/servo,boghison/servo,ConnorGBrewster/servo,jgraham/servo,GyrosOfWar/servo,wartman4404/servo,canaltinova/servo,jgraham/servo,dmarcos/servo,jimberlage/servo,szeged/servo,vks/servo,wpgallih/servo,dvberkel/servo,g-k/servo,dmarcos/servo,walac/servo,CJ8664/servo,kindersung/servo,echochamber/servo,codemac/servo,wpgallih/servo,KiChjang/servo,pyecs/servo,jlegendary/servo,larsbergstrom/servo,anthgur/servo,karlito40/servo,luniv/servo,indykish/servo,splav/servo,zentner-kyle/servo,owaspjocur/servo,notriddle/servo,dati91/servo,mt2d2/servo,rentongzhang/servo,thiagopnts/servo,snf/servo,CJ8664/servo,dsandeephegde/servo,DominoTree/servo,SimonSapin/servo,echochamber/servo,jimberlage/servo,rixrix/servo,jimberlage/servo,jlegendary/servo,saneyuki/servo,froydnj/servo,KiChjang/servo,s142857/servo,CJ8664/servo,aidanhs/servo,chotchki/servo,karlito40/servo,canaltinova/servo,AnthonyBroadCrawford/servo,larsbergstrom/servo,pyecs/servo,evilpie/servo,ryancanhelpyou/servo,jlegendary/servo,jimberlage/servo,deokjinkim/servo,pgonda/servo,saratang/servo,upsuper/servo,mbrubeck/servo,ruud-v-a/servo,ruud-v-a/servo,caldwell/servo,deokjinkim/servo,nrc/servo,indykish/servo,emilio/servo,GreenRecycleBin/servo,brendandahl/servo,ConnorGBrewster/servo,AnthonyBroadCrawford/servo,anthgur/servo,pyecs/servo,sadmansk/servo,zhangjunlei26/servo,dagnir/servo,meh/servo,Shraddha512/servo,jdramani/servo,pgonda/servo,deokjinkim/servo,CJ8664/servo,mt2d2/servo,metajack/servo,walac/servo,szeged/servo,nnethercote/servo,eddyb/servo,bfrohs/servo,peterjoel/servo,g-k/servo,g-k/servo,shrenikgala/servo,owaspjocur/servo,hyowon/servo,seanmonstar/servo,Shraddha512/servo,A-deLuna/servo,RenaudParis/servo,GyrosOfWar/servo,chotchki/servo,froydnj/servo,splav/servo,huonw/servo,luniv/servo,michaelwu/servo,dmarcos/servo,s142857/servo,saneyuki/servo,nerith/servo,WriterOfAlicrow/servo,notriddle/servo,pyecs/servo,RenaudParis/servo,jimberlage/servo,KiChjang/servo,g-k/servo,wpgallih/servo,GyrosOfWar/servo,mbrubeck/servo,avadacatavra/servo,aidanhs/servo,avadacatavra/servo,CJ8664/servo,runarberg/servo,KiChjang/servo,szeged/servo,shrenikgala/servo,nrc/servo,froydnj/servo,notriddle/servo,zentner-kyle/servo,nick-thompson/servo,luniv/servo,bfrohs/servo,walac/servo,upsuper/servo,aidanhs/servo,cbrewster/servo,dsandeephegde/servo,ConnorGBrewster/servo,nerith/servo,indykish/servo,peterjoel/servo,dagnir/servo,akosel/servo,larsbergstrom/servo,emilio/servo,wpgallih/servo,evilpie/servo,mdibaiee/servo,anthgur/servo,jimberlage/servo,upsuper/servo,pyfisch/servo,dmarcos/servo,dmarcos/servo,codemac/servo,cbrewster/servo,nerith/servo,peterjoel/servo,steveklabnik/servo,saneyuki/servo,mbrubeck/servo,deokjinkim/servo,dvberkel/servo,ryancanhelpyou/servo,upsuper/servo,indykish/servo,metajack/servo,wpgallih/servo,boghison/servo,notriddle/servo,snf/servo,Shraddha512/servo,KiChjang/servo,tschneidereit/servo,RenaudParis/servo,evilpie/servo,mrobinson/servo,ryancanhelpyou/servo,caldwell/servo,youprofit/servo,nnethercote/servo,tempbottle/servo,dsandeephegde/servo,vks/servo,pyfisch/servo,g-k/servo,zentner-kyle/servo,steveklabnik/servo,caldwell/servo,anthgur/servo,vks/servo,rnestler/servo,akosel/servo,samfoo/servo,seanmonstar/servo,tempbottle/servo,eddyb/servo,luniv/servo,rnestler/servo,karlito40/servo,mdibaiee/servo,mdibaiee/servo,kindersung/servo,DominoTree/servo,indykish/servo,michaelwu/servo,CJ8664/servo,thiagopnts/servo,wpgallih/servo,dati91/servo,seanmonstar/servo,evilpie/servo,GyrosOfWar/servo,splav/servo,mattnenterprise/servo,mdibaiee/servo,hyowon/servo,fiji-flo/servo,Shraddha512/servo,jimberlage/servo,snf/servo,AnthonyBroadCrawford/servo,peterjoel/servo,wartman4404/servo,thiagopnts/servo,Aalhad/CanvasRenderingContext2DMozilla,paulrouget/servo,RenaudParis/servo,cbrewster/servo,shrenikgala/servo,nrc/servo,meh/servo,bjwbell/servo,evilpie/servo,avadacatavra/servo,hyowon/servo,echochamber/servo,dati91/servo,jgraham/servo,zhangjunlei26/servo,indykish/servo,GyrosOfWar/servo,GyrosOfWar/servo,saneyuki/servo,WriterOfAlicrow/servo,pyfisch/servo,froydnj/servo,Adenilson/prototype-viewing-distance,runarberg/servo,juzer10/servo,hyowon/servo,mattnenterprise/servo,sadmansk/servo,peterjoel/servo,evilpie/servo,samfoo/servo,aweinstock314/servo,saneyuki/servo,deokjinkim/servo,tempbottle/servo,peterjoel/servo,codemac/servo,canaltinova/servo,bjwbell/servo,mattnenterprise/servo,paulrouget/servo,eddyb/servo,rixrix/servo,mukilan/servo,Shraddha512/servo,echochamber/servo,pyfisch/servo,mt2d2/servo,notriddle/servo,emilio/servo,aweinstock314/servo,emilio/servo,mrobinson/servo,mt2d2/servo,paulrouget/servo,shrenikgala/servo,dati91/servo,tschneidereit/servo,mbrubeck/servo,szeged/servo,dati91/servo,indykish/servo,sadmansk/servo,kindersung/servo,meh/servo,boghison/servo,indykish/servo,owaspjocur/servo,mt2d2/servo,mattnenterprise/servo,nnethercote/servo,splav/servo,brendandahl/servo,zentner-kyle/servo,tempbottle/servo,szeged/servo,rnestler/servo,paulrouget/servo,ConnorGBrewster/servo,metajack/servo,srbhklkrn/SERVOENGINE,wartman4404/servo,SimonSapin/servo,boghison/servo,kindersung/servo,tempbottle/servo,seanmonstar/servo,tafia/servo,splav/servo,mdibaiee/servo,jdramani/servo,ruud-v-a/servo,tempbottle/servo,karlito40/servo,pyecs/servo,chotchki/servo,mrobinson/servo,srbhklkrn/SERVOENGINE,indykish/servo,mattnenterprise/servo,zentner-kyle/servo,thiagopnts/servo,eddyb/servo,dsandeephegde/servo,michaelwu/servo,codemac/servo,peterjoel/servo,owaspjocur/servo,tschneidereit/servo,s142857/servo,walac/servo,KiChjang/servo,tafia/servo,rnestler/servo,DominoTree/servo,WriterOfAlicrow/servo,cbrewster/servo,ryancanhelpyou/servo,pyfisch/servo,dsandeephegde/servo,chotchki/servo,aweinstock314/servo,huonw/servo,notriddle/servo,AnthonyBroadCrawford/servo,huonw/servo,nnethercote/servo,upsuper/servo,jdramani/servo,michaelwu/servo,Aalhad/CanvasRenderingContext2DMozilla,shrenikgala/servo,fiji-flo/servo,anthgur/servo,Aalhad/CanvasRenderingContext2DMozilla,emilio/servo,mdibaiee/servo,szeged/servo,larsbergstrom/servo,dmarcos/servo,youprofit/servo,A-deLuna/servo,youprofit/servo,pgonda/servo,brendandahl/servo,mbrubeck/servo,dvberkel/servo,sadmansk/servo,peterjoel/servo,codemac/servo,nnethercote/servo,GreenRecycleBin/servo,mukilan/servo,huonw/servo,michaelwu/servo,cbrewster/servo,jlegendary/servo,Aalhad/CanvasRenderingContext2DMozilla,wpgallih/servo,bjwbell/servo,rixrix/servo,samfoo/servo,ryancanhelpyou/servo,snf/servo,juzer10/servo,nick-thompson/servo,metajack/servo,ConnorGBrewster/servo,srbhklkrn/SERVOENGINE,froydnj/servo,dagnir/servo,AnthonyBroadCrawford/servo,aidanhs/servo,luniv/servo,A-deLuna/servo,Adenilson/prototype-viewing-distance,tschneidereit/servo,dati91/servo,dagnir/servo,rixrix/servo,eddyb/servo,splav/servo,mdibaiee/servo,emilio/servo,steveklabnik/servo,dhananjay92/servo,Shraddha512/servo,vks/servo,emilio/servo,tempbottle/servo,eddyb/servo,jgraham/servo,saneyuki/servo,paulrouget/servo,saneyuki/servo,dsandeephegde/servo,paulrouget/servo,AnthonyBroadCrawford/servo,mattnenterprise/servo,ruud-v-a/servo,WriterOfAlicrow/servo,wartman4404/servo,youprofit/servo,Adenilson/prototype-viewing-distance,mukilan/servo,srbhklkrn/SERVOENGINE,sadmansk/servo,mbrubeck/servo,akosel/servo,zhangjunlei26/servo,tschneidereit/servo,dati91/servo,paulrouget/servo,ConnorGBrewster/servo,walac/servo,nrc/servo,saneyuki/servo,tschneidereit/servo,vks/servo,pyecs/servo,larsbergstrom/servo,mattnenterprise/servo,tschneidereit/servo,youprofit/servo,CJ8664/servo,samfoo/servo,SimonSapin/servo,snf/servo,KiChjang/servo,walac/servo,owaspjocur/servo,notriddle/servo,canaltinova/servo,eddyb/servo,dagnir/servo,Aalhad/CanvasRenderingContext2DMozilla,bjwbell/servo,evilpie/servo,thiagopnts/servo,karlito40/servo,peterjoel/servo,brendandahl/servo,emilio/servo,tafia/servo,aidanhs/servo,j3parker/servo,GreenRecycleBin/servo,runarberg/servo,brendandahl/servo,steveklabnik/servo,steveklabnik/servo,aweinstock314/servo,GreenRecycleBin/servo,CJ8664/servo,wpgallih/servo,sadmansk/servo,szeged/servo,dhananjay92/servo,DominoTree/servo,akosel/servo,pyfisch/servo,jimberlage/servo,dsandeephegde/servo,runarberg/servo,caldwell/servo,kindersung/servo,SimonSapin/servo,emilio/servo,j3parker/servo,rentongzhang/servo,avadacatavra/servo,pyecs/servo,meh/servo,meh/servo,dagnir/servo,samfoo/servo,GyrosOfWar/servo,larsbergstrom/servo,emilio/servo,anthgur/servo,upsuper/servo,nnethercote/servo,dsandeephegde/servo,boghison/servo,mt2d2/servo,ruud-v-a/servo,zentner-kyle/servo,nerith/servo,jdramani/servo,pyfisch/servo,A-deLuna/servo,nick-thompson/servo,mbrubeck/servo,runarberg/servo,cbrewster/servo,notriddle/servo,fiji-flo/servo,huonw/servo,tafia/servo,nick-thompson/servo,nerith/servo,wartman4404/servo,saratang/servo,canaltinova/servo,luniv/servo,seanmonstar/servo,steveklabnik/servo,fiji-flo/servo,juzer10/servo,splav/servo,nerith/servo,thiagopnts/servo,ConnorGBrewster/servo,splav/servo,zhangjunlei26/servo,juzer10/servo,SimonSapin/servo,Adenilson/prototype-viewing-distance,sadmansk/servo,KiChjang/servo,mrobinson/servo,canaltinova/servo,fiji-flo/servo,fiji-flo/servo,paulrouget/servo,chotchki/servo,dvberkel/servo,akosel/servo,owaspjocur/servo,jgraham/servo,rnestler/servo,ryancanhelpyou/servo,larsbergstrom/servo,rixrix/servo,KiChjang/servo,tafia/servo,mukilan/servo,mukilan/servo,shrenikgala/servo,upsuper/servo,huonw/servo,rentongzhang/servo,saratang/servo,nerith/servo,dhananjay92/servo,szeged/servo,dhananjay92/servo,pyfisch/servo,pyfisch/servo,jlegendary/servo,nnethercote/servo,jdramani/servo,dagnir/servo,nnethercote/servo,AnthonyBroadCrawford/servo,ruud-v-a/servo,steveklabnik/servo,SimonSapin/servo,saneyuki/servo,GreenRecycleBin/servo,youprofit/servo,tafia/servo,juzer10/servo,akosel/servo,GreenRecycleBin/servo,jdramani/servo,zhangjunlei26/servo,j3parker/servo,SimonSapin/servo,rixrix/servo,nrc/servo,meh/servo,dhananjay92/servo,bjwbell/servo,boghison/servo,juzer10/servo,g-k/servo,seanmonstar/servo,rentongzhang/servo,splav/servo,avadacatavra/servo,s142857/servo,hyowon/servo,vks/servo,bjwbell/servo,walac/servo,runarberg/servo,saratang/servo,rixrix/servo,avadacatavra/servo,zhangjunlei26/servo,DominoTree/servo,runarberg/servo,saneyuki/servo,evilpie/servo,SimonSapin/servo,zentner-kyle/servo,sadmansk/servo,wpgallih/servo,mrobinson/servo,pyfisch/servo,rentongzhang/servo,larsbergstrom/servo,bfrohs/servo,meh/servo,wartman4404/servo,A-deLuna/servo,j3parker/servo,nnethercote/servo,nick-thompson/servo,canaltinova/servo,rentongzhang/servo,j3parker/servo,samfoo/servo,nick-thompson/servo,fiji-flo/servo,aidanhs/servo,rentongzhang/servo,s142857/servo,nick-thompson/servo,avadacatavra/servo,DominoTree/servo,DominoTree/servo,anthgur/servo,WriterOfAlicrow/servo,froydnj/servo,dmarcos/servo,luniv/servo,saratang/servo,shrenikgala/servo,jlegendary/servo,DominoTree/servo,ryancanhelpyou/servo,dati91/servo,paulrouget/servo,hyowon/servo,nrc/servo,bfrohs/servo,j3parker/servo,bfrohs/servo,dhananjay92/servo,aweinstock314/servo,snf/servo,mrobinson/servo,g-k/servo,srbhklkrn/SERVOENGINE,brendandahl/servo,splav/servo,aweinstock314/servo,dvberkel/servo,dhananjay92/servo,notriddle/servo,rnestler/servo,RenaudParis/servo,jgraham/servo,echochamber/servo,GreenRecycleBin/servo,codemac/servo,metajack/servo,aweinstock314/servo,KiChjang/servo,michaelwu/servo,kindersung/servo,RenaudParis/servo,jimberlage/servo,s142857/servo,ConnorGBrewster/servo,aidanhs/servo,karlito40/servo,codemac/servo,upsuper/servo,saratang/servo,j3parker/servo,DominoTree/servo,srbhklkrn/SERVOENGINE,cbrewster/servo,peterjoel/servo,szeged/servo,saratang/servo,eddyb/servo,anthgur/servo,boghison/servo,dvberkel/servo,notriddle/servo,s142857/servo,echochamber/servo,mattnenterprise/servo,A-deLuna/servo,larsbergstrom/servo,WriterOfAlicrow/servo,metajack/servo,nrc/servo,thiagopnts/servo,pgonda/servo,rixrix/servo,zhangjunlei26/servo,Shraddha512/servo,tafia/servo,fiji-flo/servo,caldwell/servo,mukilan/servo,GreenRecycleBin/servo,rnestler/servo,hyowon/servo,zhangjunlei26/servo,mbrubeck/servo,szeged/servo,paulrouget/servo,chotchki/servo,wartman4404/servo,cbrewster/servo,thiagopnts/servo,dvberkel/servo,bjwbell/servo,larsbergstrom/servo,jgraham/servo,akosel/servo,evilpie/servo,snf/servo,nnethercote/servo,mt2d2/servo,pgonda/servo,bfrohs/servo,vks/servo,caldwell/servo,GreenRecycleBin/servo,kindersung/servo,deokjinkim/servo,huonw/servo,WriterOfAlicrow/servo,A-deLuna/servo,youprofit/servo,pgonda/servo,zhangjunlei26/servo,brendandahl/servo,echochamber/servo,jdramani/servo,rixrix/servo,caldwell/servo,DominoTree/servo,Adenilson/prototype-viewing-distance,samfoo/servo,RenaudParis/servo,canaltinova/servo