Broadway actors narrowly avoided a strike after workers reached a deal with producers