x86: cpu: Break out test for cpuid capabilities into separate function