Use intrinsic MSVC functions for counting leading/trailing zeros.

Around 2.5 faster for 64-bit numbers.
Avoid wrong bit-shifting.

Fixes Coverity issue CID#1222015
_mm_set1_epi64x is avalible only on x64 platform, but we can use it.