gmessages: fix g_test_expect_message() with NULL domains

Allow passing a NULL domain to g_test_expect_message(), and more
importantly, don't crash if a message with a NULL domain gets logged
while there is an expected message.