Function types
There need to be 'at least' two function types, 1 that works on the AST, and one that is executed during query time.
This will allow functions like timeshift (#43 (closed)) or sort_* (#45 (closed) / #46 (closed)) to re-arrange the query.