Add alloc_size attribute and apply consistently the malloc attribute to xmalloc, xcalloc, xrealloc, and xstrdup.