Amid turmoil that included a rival’s buyout offer and a newly announced transformation of the company, E.W. Scripps Co. has approved a new, lengthier contract for its CEO.