Mexico swears in president amid violent protests