Improve performance of gradient rendering
This should retain the smoother look introduced by the gamma correction changes in the 4.19 cycle, as well as the rounding jitter that fixes banding, but appears to run in about 10% of the time the old code did.
Closes #347 (closed)