updated fvar so if value is NaN, then derivative is set to NaN
updated fwd/matrix tests
Merge pull request #943 from stan-dev/feature/issue-847-fvar-nan

updated fvar so if value is NaN, then derivative is set to NaN