Clean up CPU feature detection.

The lazy static rather than polling each time also increases performance by
about 20%.