A General Methodology for Energy-efficient Scheduling in Multicore Environments Based on Evolutionary Algorithms