Check for comparisons to NaN in patterns

For every pattern that refers to a static value, evaluate it and emit a warning
if it is a NaN.

Fixes #6804
Generalize NaN pattern detection using walk_pat
NaN patterns: indicate that is_NaN is a method
auto merge of #8029 : emillon/rust/issue-6804, r=cmr

Hi,

As noted in #6804, a pattern that contains `NaN` will never match because `NaN != NaN`. This adds a warning for such a case. The first commit handles the basic case and the second one generalizes it to more complex patterns using `walk_pat`.