Moral Hazard and the Composition of Transfers: Theory With an Application to Foreign Aid