ALBANY — Gov. Andrew M. Cuomo and legislative leaders on Tuesday announced that they had reached an agreement to raise taxes on New York State’s wealthiest residents as part of a deal to overhaul the tax rates.