Implement Greatest function as Variable-arity function

For #2072 
I made some changes to Least in this PR, but I haven't merged it yet: https://github.com/facebook/presto/pull/2073

Can you update your code to mimic those changes?