check_cpu - reimplement most of the features provided by libcpuinfo

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