Feature/test nan ibeta

#### Summary:
Added NaN tests for ibeta in math/functions and agrad/rev/functions with doc on behavior at NaN. This is not exposed to users so I added doc in the code.

#### Intended Effect:
Added NaN tests for ibeta in math/functions and agrad/rev/functions with doc on behavior at NaN. This is not exposed to users so I added doc in the code.

#### How to Verify:
Run test/unit/math/functions/ibeta, test/unit-agrad-rev/functions/ibeta

#### Side Effects:
None.

#### Documentation:
Added doc on behavior of ibeta at NaN in code.

#### Reviewer Suggestions:
Anyone.