Redmine #4716: Lots of fixes to dirname(), esp. on Windows.

These problems were fixed:
* AddSlash() always adds Unix slash when argument is empty.
* DeleteSlash() removes root slash.
* FirstFileSeparator() returns NULL on all relative Unix paths, even
  if it has a file separator.
* ChopLastNode() gives empty string when removing last directory
  component of a relative path. It should give '.'.
* ChopLastNode() does not handle Windows drive letters.
* IsAbsoluteFileName() does not handle absolute paths on Windows that
  don't start with a drive letter. Both types are considered absolute
  paths.

This also fixes a Windows issue where creating a directory in policy
would lead to an error message about not being able to chdir into a
directory with the name ''. This was due to the final root slash not
being preserved.
Correct on both ;-)
The simple rule: postfix binds more tightly than prefix.  So `++sp[0]` is `++(sp[0])` while `*sp++` is `*(sp++)`.
But when both operators are on the same side, as here, there's no ambiguity.
It remains that, for typographic reasons, the parentheses aid reading.