Earlier this year, Cora’s free agency seemed a given. Now a giant payday has him in Boston through 2027.