[BUGFIX] Custom Doctrine functions must extend FunctionNode

This corrects the both Doctrine DQL functions to inherit
from \Doctrine\ORM\Query\AST\Functions\FunctionNode as described
at http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#adding-your-own-functions-to-the-dql-language.

It won't work the other way, at least in recent versions
of Doctrine.