Extending Winding Function Theory to Incorporate Secondary Effects in the Design of Induction Machines and Drives