Dr Oetker has struck a deal to buy McCain Foods' pizza operations in North America.