Add AVX2/BMI1/BMI2 detection support

Also clean up the formatting in a bit of the CPU detection code.