Madagascar’s president has dissolved his government in response to youth-led protests that killed at least 22 people.