Follow-up after mean_poisson_deviance array API PR

As a follow-up for #29227.

The following command fails locally:
```
pytest -vl sklearn/metrics/tests/test_common.py -k 'api_regression_metric and mean_poisson_deviance'
```
see full error in https://github.com/scikit-learn/scikit-learn/pull/29227#issuecomment-2244729661

but setting `SCIPY_ARRAY_API=1` works:
```
SCIPY_ARRAY_API=1 pytest -vl sklearn/metrics/tests/test_common.py -k 'api_regression_metric and mean_poisson_deviance'
```

Honestly I think this is fair to say that as a newcomer to the array API work, my feeling is that it can break way too easily in very mysterious ways. There are probably a few unrelated reasons for this but I guess since at the last bi-weekly meetings we agreed that we should try to pay attention to this kind of breakages and improve the situation, here are a few comments on this #29277:
- I think we should have some tests with scipy>=1.14 and `SCIPY_ARRAY_API` unset. This seems something that could easily happen in practice and we should have tests that make sure that nothing breaks. It's not clear to me why only array-api-strict breaks and not pytorch example, maybe as the name implies array-api-strict is even stricter than other namespaces.
- I don't think this is acceptable to skip the test for scipy<1.14 since you know a reasonable user may use `array_api_dispatch=True` with scipy<1.14. To be fair it is not clear to me what happens in this case. I guess scipy will transform the array into a numpy array, and maybe the code afterwards has issues because some arrays are not in the same namespace? Anyway, we should make sure that the user code does not break. If this is really too hard to achieve the alternative is to raise an exception saying something like "to enable array API dispatch with this particular function you need scipy 1.14 and `SCIPY_ARRAY_API=1`".
- the warning about `SCIPY_ARRAY_API` seems too broad (as soon as `set_config(array_api_dispatch=True)` is called?). Could we not have warnings only in a few (at least for now) places where we know we call scipy functions?

_Originally posted by @lesteve in https://github.com/scikit-learn/scikit-learn/issues/29227#issuecomment-2244803503_

COMMENT:
> Should we make the warning an error for tests?

This is certainly an option to make it an error only for tests. I guess you are implying that making it an error in the general case seems too aggressive?

Also unrelated, but as a developer I find it slightly annoying that now I have to know that I need to set `SCIPY_ARRAY_API=1` otherwise some tests will fail (I have installed `array-api-strict` in my main scikit-learn dev environment because I feel like I am more likely to catch array API issues :sweat_smile:). Maybe it is an argument for skipping the `mean_poisson_deviance` test if scipy array API support is not enabled. Maybe it's not worth it and I can also probably find a way to tweak my setup for this ...

Edit: for now I have found a work-around which is to have a untracked `conftest.py` at the root of the folder. I leave it untracked so I can switch easily between different branches and still have it:
```py
import os

try:
    import array_api_strict
    os.environ["SCIPY_ARRAY_API"] = "1"
except ImportError:
    pass
```

Labels: Array API