Implicit Rate-Constrained Optimization of Non-decomposable Objectives