For more than a century, fasting—up to 382 days without calories—has been used a weight-loss treatment.