add range version of setExtension

Since Walter is being unresponsive, I'm hijacking his [original PR](https://github.com/D-Programming-Language/phobos/pull/2149). This PR basically uses Walter's code as base, and adds some fixes on top per reviewers' comments.
Still too redundant.
For instance:
```
auto files = [ "file", "file.", "file.", "file.old", "file.exe"];
auto exts = [ ".ext", ".ext", "ext", "new", "", ""];
auto rets = [ "file.ext", "file.ext", "file.ext", "file.new", "file", "file"];
And then just spin over these arrays. w/d string are easily obtained with to!(StringType)(".ext").

Even better to keep each test case as a tuple and have a single array of them.
See also `std.string` for ideas on how to test a bunch of code for all string types.