The White House communications director has resigned after a whirlwind three years in which the former model with zero political experience became one of the president’s closest aides