Optimal debt, endogenous fertility, and human capital externalities in a model with altruistic bequests