Nissan Motor Co has agreed to buy a 34% stake in Mitsubishi Motors Corp, taking de facto control with a $2.2bn bet that bails out its smaller, scandal-hit rival.