Portugal will exit its bailout in better shape, but far from healed