Make the modules `mie.py` and `polynomials.py` compatible with XP. Note: scipy.special does not maintain gradients, so we need to implement the three functions ourselves. But that should not be difficult.