California Democratic Gov. Gavin Newsom signed legislation Friday intended to open the way for the state’s last operating nuclear power plant to run an additional five years, a move that he said was needed to ward off possible blackouts as the state transitions to solar and other renewable sources.