Optimal Mechanisms for Differentially Private Histogram Publication