The Co-operative Bank has finalised a £700million rescue deal with investors to stop it being wound down 