CAIRO — President-elect Mohamed Morsi of the Muslim Brotherhood pre-empted the military’s choreographed swearing-in ceremony by taking an oath of office a day early on Friday, in a televised speech to tens of thousands of supporters in Tahrir Square.