ENH: optimize: curve_fit now warns if pcov is undetermined

The user function may work with infs in input, so maybe `asarray(xdata); if np.isnan(xdata).any()...`