Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled.
When DEBUG_THREADLOCALS is enabled it causes the threadlocal cleanup to be
called as a function. This causes a compile error with raw threadstorage as
it uses NULL for cleanup. This fix uses a macro that provides NULL when
DEBUG_THREADLOCALS is disabled, and replaces the call to "c_cleanup(data);"
with "{};" when DEBUG_THREADLOCALS is enabled.
ASTERISK-24975 #close
Reported by: Ashley Sanders
**** ASTERISK-24975 Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402
Cherry-pick from v13 with additional definitions of
AST_THREADSTORAGE_RAW(), ast_threadstorage_get_ptr() and
ast_threadstorage_set_ptr() from
commit
d01706ce1ee518118456d5673f529204bdac73bb.
Change-Id: I3222102d005f76744561b95a3b97700d82a5ee58