FRESCO: A Framework for the Energy Estimation of Computers (Extended Version)