enhance get_cpu_speed to also support determining CPU frequency on POWER, and clean things up