Rent-Seeking Can Promote the Provision of Public Goods