Andrés Manuel López Obrador - Mexico's first leftist president in seven decades - has been sworn in at a ceremony in the country's parliament.