Generalized Model Predictive Direct Torque Control: Long prediction horizons and minimization of switching losses