First cut at cleaning up Sergio's example code and moving some common code to SkWindow.

Eventually, this will be moved to be a peer of SampleApp so it is compiled by the bots to avoid future bit rot.

Also ignore XCode auto-generated flag in CommandLineFlags, and remove the unused multiple-example part.

Review URL: https://codereview.chromium.org/890873003
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index dc99fec..50c193f 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -303,6 +303,11 @@
                 flag = flag->next();
             }
             if (!flagMatched) {
+#if SK_BUILD_FOR_MAC
+                if (SkStrStartsWith(argv[i], "NSDocumentRevisions")) {
+                        i++;  // skip YES
+                } else
+#endif
                 if (!FLAGS_undefok) {
                     SkDebugf("Got unknown flag \"%s\". Exiting.\n", argv[i]);
                     exit(-1);