elements: Allow calling ST_ functions on WKTElements
elements, comparator: Merged duplicate code into ST_FunctionMixin class