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.