gmem.h: Use __typeof__() in the g_clear_pointer() macro
Type punning is used on the existing implementation, which hides errors such as:
GSList *list = NULL; g_clear_pointer (&list, g_error_free);
Let's use typeof to cast the passed-in pointer before it's passed to the free function so it trips -Wincompatible-pointer-types if it's wrong.
Fixes #1425 (closed)