MESOS-1208: Add -Wno-unused-local-typedefs if gcc version is >= 4.8

Fixes `MESOS-1208`. The issue is that starting from GCC 4.8, `-Wall` includes `-Wunused-local-typedefs` by default. Since `-Werror` is also present, we end up with an error. I think the better fix would be to update boost, but this fix has less risk.

EDIT: Turns out we were already handling this, but only for GCC 4.8. Modify `configure.ac` to handle it for >= GCC 4.8 instead.

Review: https://reviews.apache.org/r/24816