Tight Complexity Bounds for Optimizing Composite Objectives