CXX-377 Fix clang warnings in headers

Cherry pick of server commit db59c175c736609970b52f91e30fc2277e22b25b