The US ambassador to Kenya, once a confidant of President Obama, abruptly announced Friday — days before the release of an internal audit — that he was resigning, citing ‘‘differences with Washington.’’ Scott Gration’s departure will leave the top embassy post vacant at a time when Kenya is increasingly being drawn into a battle with militant Islam.