memdebug: set gcc 11+ deallocator attribute, extend alloc attributes to clang
To make `-Wfree-nonheap-object` and `-Wmismatched-dealloc` work in
`CURLDEBUG` builds.
Also extend `ALLOC_FUNC` and `ALLOC_SIZE` attribute support
to llvm/clang.
llvm/clang is missing the deallocator attribute, tracked here:
https://github.com/llvm/llvm-project/issues/129068
Ref: https://gcc.gnu.org/onlinedocs/gcc-11.1.0/gcc/Common-Function-Attributes.html#Common-Function-Attributes
Ref: https://www.gnu.org/software/gcc/gcc-11/changes.html
Ref:
6b143d9cc13fcd208480f678dfd06bf97bde4998 #16734
Closes #16737