Attempt at improving uniform solving by switching to the bisection method.

It still doesn't work well on the uniform distribution, because the C.D.F. computation doesn't work well for large values.
Find limits where the p.d.f. is non-zero, and only integrate in that region.

This approach seems to allow for faster and more accurate sampling from both uniform and normal distributions, and should work well for most other distributions that are expected to be seen, as long as they don't have very narrow spikes.