build: define g_clear_pointer() in the compatibility header nm-glib-compat.h

It is needed to be able to compile with glib 2.32 that does not contain the
function.