Titanic shipyard Harland and Wolff saved from closure in £6m deal