Oct 30 (Reuters) - General Motors and the United Auto Workers (UAW) union have reached tentative contract agreement, a source familiar with the matter told Reuters, signaling an end to walkouts that have cost the No. 1 Detroit automaker more than $400 million a week. (Reporting by David Shepardson in Washington Editing by Peter Henderson and Matthew Lewis)