Connections with totally skew-symmetric torsion and nearly-Kähler geometry