Add support for MINNAN and MAXNAN operators

NAN-safe version of MIN and MAX. If one of the input numbers is
unknown then the result of the operation will be the other one.
If both are unknown, then the result of the operation is unknown.
Merge pull request #440 from julthomas/jth/1.4/minmaxnan

Add support for MINNAN and MAXNAN operators