Add printf attribute to document_show_message() for better safety

Add G_GNUC_PRINTF attribute to document_show_message() so some
compilers can check the format arguments match the format string.