Analysing contributions of ages and causes of death to gender gap in life expectancy using functional data analysis