BUILD: Sync upstream boost.m4 changes

Based on 4765a2e4f1775c58765da5275c906ced5bba779d in
https://github.com/tsuna/boost.m4/

Changes done to upstream:
- Merge _BOOST_mingw_test into _BOOST_gcc_test
- Add test for gcc 4.9
- Add test for Boost.Atomic
- Changed how BOOST_FIND_LIB handles the CXX-PROLOGUE
  parameter. The generated test now inserts that parameter
  before the #include directive, instead of after.

  This is needed for the Boost.Atomic check, since unistd.h
  might only define intptr_t and not uintptr_t, but
  Boost.Atomic creates typedefs for both types. uintptr_t
  is still defined by stdint.h, but Boost.Atomic doesn't
  include that on purpose when compiling with gcc.

  To fix this issue, CXX-PROLOGUE is moved before the
  include and set to include both unistd.h and stdint.h,
  in that order.
COMMON: Work around glibc 2.19 breaking Boost.Atomic

Similar to the change in boost.m4, this fixes compilation
of uuid.cpp with glic 2.19 and Boost 1.54.