Avoid overflow in powerlaw flux computation.

The original powerlaw integration functions were prone to overflows for large gammas as the function computed the pow(energy, -gamma), where -gamma can be a large positive number.
Add powerlaw flux computation unit test.