safe pure nothrow sort and sum

Since @9rnsr fixed 12542, it is now possible to have pure/nothrow/safe `sort` and `sum`. `sum` needed no work done, so I just went and made the marked unittests so as to cover the inference.

`sort` was a bit harder. I had to strip some formatting in error handling, so as to make the code nothrow (no big loss here I think). I also had to work a bit around 12410.

I'm not sure `sort` is quite as safe/pure/nothrow as it could be for every type (I haven't done too much checks), but at the very least, it is for PODs inside arrays, with predicates. That's already pretty good.

That's it.

@9rnsr: Do you know about https://issues.dlang.org/show_bug.cgi?id=12410 ?