John Herdman, embroiled in the drone-spying scandal that has dogged Canada Soccer, has resigned as coach of Toronto FC.