Multi-Phase Spacecraft Mission Optimization by Quadratically Constrained Quadratic Programming