ENH: optimize: curve_fit now warns if pcov is undetermined

but even if we do 
```
xdata = np.asarray(xdata)
if np.isnan(xdata).any():
...
```
we still would want to raise an exception, as we have no way to know if the user function can handle infs... We could add a kwarg `allow_inf`, but I am not sure it is worth it to complicate the API...