Ken Livingstone has resigned from the Labour Party, saying the issues around his suspension for anti-Semitism had become a distraction.