added failing NaN test for agrad/rev/fmax
fixed agrad/rev/fmax so gradients return NaN when input is NaN