Decrying 'nightmare' crisis over judicial revamp, president says current legislative package undermines democracy, asserts he has reached behind-the-scenes agreement on most issues