added failing NaN test for agrad/rev/fmax
fixed agrad/rev/fmax so gradients return NaN when input is NaN
added failing nan test for agrad/fwd/fmax
fixed agrad/fwd/fmax so derivatives return nan for nan input
added doc for fmax
Merge branch 'develop' into feature/test-nan-fmax
Merge branch 'develop' into feature/test-nan-fmax
Merge pull request #999 from stan-dev/feature/test-nan-fmax

Feature/test nan fmax