US wholesaler Costco is to buy the remaining 50% stake in its Mexican unit from joint venture partner Controladora Comercial Mexicana (CMM).