Con Ed elects John McAvoy as chairman