Add an option parser

On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency.  We can roll out own option parser and solve both problems
and save a few lines of code total.
diff --git a/clients/view.c b/clients/view.c
index 918d22f..61a3d5c 100644
--- a/clients/view.c
+++ b/clients/view.c
@@ -252,10 +252,8 @@
 
 static int option_fullscreen;
 
-static const GOptionEntry option_entries[] = {
-	{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE,
-	  &option_fullscreen, "Run in fullscreen mode" },
-	{ NULL }
+static const struct weston_option view_options[] = {
+	{ WESTON_OPTION_BOOLEAN, "fullscreen", 0, &option_fullscreen },
 };
 
 int
@@ -264,7 +262,10 @@
 	struct display *d;
 	int i;
 
-	d = display_create(&argc, &argv, option_entries);
+	argc = parse_options(view_options,
+			     ARRAY_LENGTH(view_options), argc, argv);
+
+	d = display_create(argc, argv);
 	if (d == NULL) {
 		fprintf(stderr, "failed to create display: %m\n");
 		return -1;