(Reuters) - Toronto-based insurance group Fairfax Financial Holdings Ltd has agreed to buy Swiss insurer Allied World Assurance Company Holdings AG for $4.9 billion in cash and stock, the companies said on Sunday.