gimp-mkenums: Ignore forward declarations

Based on patch by Dan Winship (see commit f049262a in the glib git
repo).
app: Unwrap enum constant definition to a single line

gimp-mkenums prints a parse error otherwise though it seems to generate
the correct output.
app: Fix format specifier
app: Remove unused variable
app: Return NULL if assertion fails