Intertemporal Price Discrimination: Structure and Computation of Optimal Policies