The Optimal Mechanism for Selling to Budget-Constrained Consumers