proxy/gnome: fix up threading issues and other bugs
proxy/gnome: fix up threading issues and other bugs

We had a mutex to deal with the possibility of multi-threaded use, but
were unlocking it too soon, so there wasn't any actual thread safety
(or at least, not much) if GProxyResolverGnome was being used from
multiple threads at the moment that the GSettings were changed.

Additionally, lookup_async() wasn't noticing updates to the settings
if they switched from automatic to manual/direct, and if they switched
from in the other direction, then the first lookup_async() call after
the change would end up making a synchronous call to the pacrunner.

Also, fix two cases where an operation could return both a list of
proxies and a GError.

GNOME/glib-networking,GNOME/glib-networking,Distrotech/glib-networking,Distrotech/glib-networking,GNOME/glib-networking,Distrotech/glib-networking