Orbital optimization in electronic wave functions; equations for quadratic and cubic convergence of general multiconfiguration wave functions