At the end of a tenure marked by war and division, the outgoing secretary of state defends his legacy on Gaza and Ukraine and says he’s made America stronger.