Implement general per-pixel `solid_angle` function

We should implement a good method to compute per-pixel [solid_angle](https://gammapy.readthedocs.org/en/latest/_modules/gammapy/image/utils.html#solid_angle).

Probably this should go in `astropy` directly.

Let's wait for the implementation in `gammalib` (see [here](https://cta-redmine.irap.omp.eu/issues/1017)) and then re-implement that here.