influxql: move ORDER BY parsing to its own func