V2: Fix C states and P states presentation issue.

If using '10' in this 'for' loop, for P states, once the processor
provides more than 10 P states, those additional ones cannot been
presented; and for C states, once the processor provides maximize
C states level more than 9, for example, it only has POLL, C1, C3,
C6, C10, the additional one like C10 also cannot be presented.

Now we get the loop numbers from the system information we had got
before.

Changes from V1:
Using std:max to simplify codes

Signed-off-by: Austin Zhang <zhang.austin@gmail.com>
Using std::max to handle all such kind of logic

Signed-off-by: Austin Zhang <zhang.austin@gmail.com>