lib: rewrite rb_uri_handle_recursively_async

The new implementation uses async gio methods rather than creating
a thread and calling rb_uri_handle_recursively.  This avoids some
hassles with main loop contexts and should also be a bit faster.