Endogenous Market Participation and the General Equilibrium Value of Money