render_if_ready(): Truly accept the is_new_image parameter we pass at most places already anyway
render_image(): Load gamma, gain from session variables instead of sliders (which may or may not be set up at this point)
render_if_ready(): also expects image as its first argument
templates/webgl: Do not reload image on each webgl template re-render
templates/webgl: Formatting fixes