PHOENIX-1000 Support FIRST_VALUE, LAST_VALUE, and NTH_VALUE aggregate functions. (Vaclav)