Sort timeseries on tabular view.

Having timeseries jump around every time you hit Execute is annoying.
Some ordering is required, so sort the timeseries. localCompare is
browser-dependant, but that's sufficient for this use case.

More powerful sorting/grouping options would be nice, this should cover most
use cases as a sane ordering like this is sufficient for eyeballing data.
I understand your argument for putting stuff like this into the query layer, but it has some downsides:  a) that functionality now needs to be added to all the different presentation layers (or other consumers), and b) it would require extra UI elements for everyone although they'd be used only seldomly. See also https://github.com/prometheus/prometheus/issues/414. If we build this into the query language as a function, it's available anywhere, and it adds minimal mental overhead for anyone who doesn't need it.

As for ordering requirements for other expression functions/aggregations, I'd just say: no functions give any guarantees about the sorting of the output, except special ones like `sort` and `sort_desc`. If you wrap anything around them, that means you lose sorting guarantees again.