gfile: Fallback to local path for unknown schemes

g_file_new_for_cmd_path() doesn't handle files with colons ideally:

$ touch foo:bar
$ gio info foo:bar
gio: foo:///bar: The specified location is not supported

Just a note that "./foo:bar", "~/foo:bar" or "file:///foo:bar" works
properly. With this patch, the file info is shown even for "foo:bar"
when "foo" isn't supported scheme.

Side-effect of this patch is that operations will fail with "No such
file or directory" if the local file doesn't exist as well instead of
"The specified location is not supported" (ie. with G_IO_ERROR_NOT_FOUND
instead of G_IO_ERROR_NOT_SUPPORTED)...

https://gitlab.gnome.org/GNOME/glib/issues/1623
diff --git a/gio/gfile.c b/gio/gfile.c
index a5709a4..87c792d 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -6612,29 +6612,28 @@
 }
 
 static gboolean
-is_valid_scheme_character (char c)
-{
-  return g_ascii_isalnum (c) || c == '+' || c == '-' || c == '.';
-}
-
-/* Following RFC 2396, valid schemes are built like:
- *       scheme        = alpha *( alpha | digit | "+" | "-" | "." )
- */
-static gboolean
 has_valid_scheme (const char *uri)
 {
-  const char *p;
+  const gchar * const *supported_schemes;
+  char *scheme;
+  gboolean is_valid;
+  int i;
 
-  p = uri;
-
-  if (!g_ascii_isalpha (*p))
+  scheme = g_uri_parse_scheme (uri);
+  if (scheme == NULL)
     return FALSE;
 
-  do {
-    p++;
-  } while (is_valid_scheme_character (*p));
+  is_valid = FALSE;
+  supported_schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
+  for (i = 0; supported_schemes[i] != NULL; i++)
+    if (g_ascii_strcasecmp (supported_schemes[i], scheme) == 0)
+      {
+        is_valid = TRUE;
+        break;
+      }
+  g_free (scheme);
 
-  return *p == ':';
+  return is_valid;
 }
 
 static GFile *