Made the non-central chi-squared PDF more robust. Set generic mode calculation to throw if the original guess yields a zero PDF. Updated tests to match.