lscpu: support non sequentially numbering of CPUs

lscpu don't work correctly on my system with:

 $ cat /sys/devices/system/cpu/possible
 0-1,4-5,8-9,12-13

[kzak@redhat.com: - coding style,
                  - add commit message
                  - add real_cpu_num() macro,
                  - fix functions where we need idx as well as CPU number]

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: add sparc64 lscpu test

Signed-off-by: Karel Zak <kzak@redhat.com>