Chaotic spin dynamics of a long nanomagnet driven by a current