Fixed bugs

The tolerances are initialized and updated.
tol = min(tol,kktResid) Where
kktResid = max(spResid, sdResid, rgap2).