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.
Well, strip `setExtension` doesn't need to allocate at all to begin with, all it does is slice. There are cases where it doesn't even decode either.

So I don't even think there's anything to disagree on.

That said, the advantage I'd see to doing `setExtension` in a separate PR is that it actually gets merged in a timely fashion. @quickfur : Make a quick new PR for `setExtension` ?