Fix issue 10601.

If extension is empty, std.path.setExtension should be equivalent to
std.path.stripExtension. This special case is useful in generic code
that needs to alternate between, e.g., .exe on Windows and no executable
extension on Posix.
Simplify unittest.
Merge pull request #1409 from quickfur/issue10601

Fix issue 10601.