The restoration of one of the largest Grade I-listed buildings in the north of England – with a view to making it the new northern home of the British Library – has been given been a major cash boost.