Renormalization-group improved effective potential for gauge theories in curved spacetime