A disused former care home in Mansfield could be saved from demolition and used to help address the town’s housing shortage.