A new study shows sustained weight loss in middle age can lead to a longer, healthier life. Here’s why.