[RDY] func-attr: fix non-existent function attributes for clang 3.5 + add nonnull attr

@oni-link does this solve your clang 3.5 issue? I tried compiling llvm 3.5 with homebrew but it failed at some point.

@philix I took the liberty of adding another attribute that should save a lot of null-checks the compiler will try to do under the hood since your xmalloc/xrealloc can't return null.