Recent addition of the GCC __attribute__(alloc_size) to some functions in mem.h broke the build when using Clang 3.5. This commit introduces configure-time checks for all GCC attributes used in the Serval source code, and adapts accordingly.