Philippine troops begin leaving a devastated Marawi city where Islamic State supporters waged a brutal five-month battle.