A Market Mechanism for the Optimal Control of Groundwater and Surface Water Pollution from Nitrates