Obese patients lived longer if they had weight loss surgery, study finds