A Risk-Theory Model to Assess the Capital Requirement for Mortality and Longevity Risk