GM agrees to invest $787M in Canada plant, reaches tentative deal with Unifor