CPUID test case cleanups

This pull request contains simple cleanups of the CPUID test cases, to make the code simpler and easier to change and understand.

This depends on pull request #707 to be applied first.