Update ReplaceIllegalCharactersInPath to handle quirks in HFS+ and VFAT

This change:

- Re-introduces U+200C and U+200D as illegal characters since these are
  ignored on HFS+ and can interfere with filename sanitization. All code
  points in the Cf general category are now considered illegal in a
  filename.

- Leading and trailing WSpace and '.' characters are now considered
  illegal.

- Due to being confused for short names on VFAT filesystems, the tilde
  ('~') is now considered illegal.

- Prior to this change, only ASCII whitespace were trimmed from
  filenames on Mac OSX. All UTF-8 encoded WSpace characters are now
  handled on Mac OSX.

- Instead of trimming leading and trailing whitespace, they are now
  replaced by the replacement character. Trimming could cause a
  previously hidden extension or basename to be exposed.

BUG=444102
BUG=446538

Review URL: https://codereview.chromium.org/869823003

Cr-Commit-Position: refs/heads/master@{#314041}
6 files changed