Ireland-based retailer Musgrave has struck a deal to buy Superquinn after its troubled local rival was put into receivership amid high debts.