Switch all creations and tests of NaN from implementations of standard
library to implementations of Qt.