The tropical Poincaré-Hopf theorem