Fix issue 13594: next(Even)Permutation doesn't need to take input range by ref.

Fixes: https://issues.dlang.org/show_bug.cgi?id=13594

Supercedes: https://github.com/D-Programming-Language/phobos/pull/2650

```D
int[3] a  = [1,2,3];
```