A building in rural Preston that was once part of the largest asylum in the UK is to be converted into a luxury home.