add func_attr.h to be able to use func attribs

Currently enables these for every gnu-like compilers, i.e.: gcc, clang and
icc.

mm
use function attributes on allocation functions

This should allow gcc/clang/icc to generate better code and clarifies
function intent.