thrift/lib/cpp/util/VarintUtils-inl.h: only gate with __BMI2__
thrift/lib/cpp/util/VarintUtils-inl.h: only gate with __BMI2__

Summary:
On MSVC there's no `__BMI2__` flag.
- https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?redirectedfrom=MSDN&view=msvc-160

On MSVC `_pdep_u64` is defined regardless of `/arch:AVX` or similar flags (eg https://godbolt.org/z/PabEKo58b). But even though the function is defined it can be dangerous to emit it in case the binary runs on a processor that doesn't have the instruction.

I chose `__AVX2__` (`/arch:AVX2`) as a good enough proxy: AVX2 was launched on Haswell - which also introduced BMI2.

This caused issues on Linux when compiled with `-mavx2` which I forgot to test for (see T96334176).

For safety don't enable this optimization on MSVC for now and just gate it using `__BMI2__`.

Reviewed By: simonmar, vitaut

Differential Revision: D29876990

fbshipit-source-id: da7f4bc9dd4a83bb341ad796b491afb239fdb318

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift