The cost-optimal methodology to assess the energy saving potential for historic architectures: case study of an educational building