zip: Clean up zip file handling code.
zip: Clean up zip file handling code.

No change in functionality.

- Reduce #ifdef from the code using FilePath::*UTF8Unsafe()
  "Unsafe" looks scary but there is no safe way to handle
  UTF-8 file names on Linux, so the new code is no worse than
  the original code.
- Put file-local functions to anonymous namespace.
- Introduce OpenForZipping() and OpenForUnzipping().
- Simplify some file name handling code.

BUG=chromium-os:22351
TEST=out/Release/unit_tests --gtest_filter=ZipTest.*

Review URL: http://codereview.chromium.org/8437044

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@109181 0039d316-1c4b-4281-b951-d872f2087c98

dednal/chromium.src,rogerwang/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,keishi/chromium,robclark/chromium,jaruba/chromium.src,keishi/chromium,ltilve/chromium,ltilve/chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,keishi/chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,keishi/chromium,ltilve/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,rogerwang/chromium,anirudhSK/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,Just-D/chromium-1,robclark/chromium,rogerwang/chromium,markYoungH/chromium.src,hujiajie/pa-chromium,M4sse/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,keishi/chromium,markYoungH/chromium.src,littlstar/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,jaruba/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,jaruba/chromium.src,Chilledheart/chromium,robclark/chromium,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,hujiajie/pa-chromium,Chilledheart/chromium,ltilve/chromium,Fireblend/chromium-crosswalk,robclark/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,Just-D/chromium-1,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,patrickm/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,Fireblend/chromium-crosswalk,Chilledheart/chromium,keishi/chromium,zcbenz/cefode-chromium,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,M4sse/chromium.src,markYoungH/chromium.src,keishi/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,patrickm/chromium.src,timopulkkinen/BubbleFish,Jonekee/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,chuan9/chromium-crosswalk,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,krieger-od/nwjs_chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,dednal/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,jaruba/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,patrickm/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,zcbenz/cefode-chromium,markYoungH/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,hujiajie/pa-chromium,Jonekee/chromium.src,rogerwang/chromium,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,robclark/chromium,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,chuan9/chromium-crosswalk,patrickm/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,robclark/chromium,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,Just-D/chromium-1,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,ChromiumWebApps/chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,Jonekee/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,rogerwang/chromium,dushu1203/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,Jonekee/chromium.src,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,littlstar/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,robclark/chromium,dednal/chromium.src,krieger-od/nwjs_chromium.src,rogerwang/chromium,M4sse/chromium.src,rogerwang/chromium,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,ltilve/chromium,keishi/chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,markYoungH/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,anirudhSK/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,robclark/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,dushu1203/chromium.src