What was supposed to be an amicable departure for the president’s chief strategist became a messy exit after public furor over the president’s response to a race-fueled melee.