Leftist Pedro Castillo was sworn in as Peru's fifth president in three years on the 200th anniversary of the country's independence, promising an end to corruption and a new constitution.