Use pkg-config for external libraries.
Use pkg-config for external libraries.

Instead of hardcoding -lthrift, use `pkg-config --libs thrift` in LDFLAGS. This
commit also adds a dummy call to pkg-config --cflags in CXXFLAGS for the sake of
uniformity.

sas/clang-cache,sas/clang-cache