Martin Truex Jr. will leave Earnhardt Ganassi Racing for Michael Waltrip Racing when his contract expires at year’s end