NEW YORK/FRANKFURT (Reuters) - Germany's Deutsche Boerse is in advanced talks to buy NYSE Euronext, and the London Stock Exchange has agreed to buy Canadian stock market operator TMX, as exchanges globally look for ways to boost their markets and cut costs.