Also use popcount intrinsics with Clang, MinGW, and MSVC

Enabled popcount intrinsics when compiling with Clang, MinGW, or MSVC (in addition to GCC).
The function was also slightly modified so that under normal circumstances -- when one of the compiler intrinsics is used -- this function will simply act as an alias for the intrinsic (so the compiler will always be able to generate the most optimized code for it).