Cleanup cpuid function.

Since I messed with this cpuid function for quite some time I though cleaning it up might be a good idea and a simple way to get started with hacking Halide.