fbcode: __x__-protect all __attribute__ keywords, mechanically

Summary: The first (and sometimes 2nd) argument to __attribute__
should begin and end with "__". If it does not, then it
is at risk of conflicting with user cpp-defined symbols.
Don't do that.  This change mechanically corrects most
such violations in fbcode.  A companion change (see parent task)
adds a lint rule to help keep things clean going forwards.

Define this function to filter the list of file names to which
we will apply the transformations. First, ensure we modify only
C and C++ sources.  The second process excludes a few directories
that appear to contain third-party code:

  filter() {
    grep -E '\.(c|h|cc|cpp|hpp)$' | grep -vE \
      '^external/|/unbound/|/gearmand_|(3rd|third.)party|/external/libevent'
  }

then, run this command,

  git grep -l __attribute__ | filter \
    | xargs perl -pi -e 's/(__attribute__ *)\(\(( *[^_]\w+)/$1((__${2}__/g'

inducing changes like this, for each such keyword:

  -} __attribute__((packed));
  +} __attribute__((__packed__));

That got all but the __format__ archetype arguments like this:
__attribute__((__format__(printf.  That final "printf"
keyword should have the "__" prefix and suffix, too.

Run this command to transform those remaining uses:

  git grep -l '__attribute__.*__format' | filter | xargs perl -pi -e \
    's/(__attribute__ *\(\(__format__ *)\( *(printf|scanf|strftime|strfmon)/$1(__${2}__/g'

That command induces changes like this:

  -static inline int __attribute__ ((__format__ (printf, 3, 4)))
  +static inline int __attribute__ ((__format__ (__printf__, 3, 4)))

This exercise is useful to avoid spurious name-space conflicts,
especially when the unprotected keyword is used in a header file.

Reviewed By: @Gownta

Differential Revision: D1508983