The agreement all but ends one of the longest labor crises in the history of the entertainment industry. Union members still have to approve the deal.