People who eat peanuts or other nuts may live longer, a new study finds.