ENH: optimize: curve_fit now warns if pcov is undetermined

@ev-br: simplefilter('ignore') also marks the warning as raised in
__warningregistry__. You need to use "with catch_warnings(record=True)
as w:" and "simplefilter('always')" to avoid it.