UK department store retailer House of Fraser is to go ahead with the closure of 31 stores after the company settled a legal row with its landlords.