Issue 845 test nan

#### Summary:
Fixes issue #857.

#### Intended Effect:
Gradient of agrad/rev/floor should return NaN for NaN inputs, not 0 as it was before.

#### How to Verify:
Run unit tests.

#### Side Effects:
None.

#### Documentation:
None.

#### Reviewer Suggestions:
Anyone.