Review: extend inf/nan checking to derivatives, fix problem with arrays (issue199063)
Extend the inf/nan checking to also check (and print specific messages
for) derivatives. Also, fixed a minor buglet that, for arrays, would
only have checked the first element for inf/nan.
Please review this at http://codereview.appspot.com/199063/show