Women tend to live longer than men in all countries — but the sex gap in life expectancy is not a constant.