Use native isFinite method to detect NaN and Infinities

Native `isFinite` function is much faster that current elaborate way to detect `NaN`, `Infinity` and `-Infinity`.
Speed test: http://jsperf.com/exotic-nan.