max with a NaN argument should simplify to NaN.
A NaN argument in min/max should result in NaN. This logic was added to resolve_internal
but was missing in the simplification.
Differential Revision: https://phabricator.services.mozilla.com/D220490
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1887455
gecko-commit: b7b78be1e36c4a58eeb75cbb2822cfad76e0dcfa
gecko-reviewers: emilio