Rail union approves contract, raising hopes the holidays won’t be ruined by an economically devastating strike