Fix unicode errors on Windows in path_is_dir, path_exists, getcwd and rust_localtime.

This make these functions use wchar_t version of APIs, instead of char version.
auto merge of #9812 : HNO3/rust/windows-utf8, r=alexcrichton

This fixes #9418 and #9618, and potential problems related to directory walking.