fix exitflag in NonlinearProgram

solves #350 and #255 
1. NonlinearProgram returns exitflag=1 when it solves the problem with any solver.
2. Switch to sqp method for fmincon in testNLP, the default interior-point-method does not solve it