Fix coverity varnings (hopefully). Refs #9939
Medium severity coverity issues. Refs #9939
One more warning. Refs #9939
Merge remote-tracking branch 'origin/bugfix/9939_Coverity_CurveFitting'