cpufreq lib - rework the library API

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>