UK supermarket group Wm Morrison has announced that it has agreed to sell four Safeway stores to rival Asda.