National debt, public capital, and welfare in developing economies