Clean up the code of many examples in minor ways, fix some memory leaks, and avoid the use of dialogs where a regular toplevel works just as well.
This started life as a standalone tool, but it is nicer to have it integrated in gtk3-demo.