ENH: rm `set_flags` and `return_residuals` from internal functions
2 simple things:
- moved the residual calculation to the calling function (because its needed only there)
- renamed
residual
within the function, because its not appropriate. namedfitted
now
nothing more
Edited by Bert Palm