Ahistoric workhouse infirmary has opened to visitors for the first time, along with a new research library, following a major five-year restoration project by the National Trust.