UK retailer Marks & Spencer has appointed John Lewis finance chief Helen Weir as its next CFO.