High street bakery chain Greggs said it plans to close four manufacturing sites with the expected loss of around 740 jobs in the next two-and-a-half years.