The Cambridge Public Library Staff Association ratified a new three-year contract with the city of Cambridge on Wednesday after a year of bargaining, which had stalled for months over wage increases.