Tanzania President John Magufuli was sworn in for the second time on Thursday after his contested landslide election win last month.