Government debt and social security in a life-cycle economy