session: Do not cache service name, type or bearer

The aim is to remove all clutter in struct service_entry.

Since service name, type and also bearer information can be
retrieved at runtime and is used only for the D-Bus API.
Therefore there is no need to maintain a cached version of
this information.
service: Remove service name in service_iterate_cb()

The service name can be retrieved via __connman_service_get_name()
if needed. The only user of service_iterate_cb() was session.c
which does not use the service name directly anymore.
session: Use a hash table to lookup sessions by service_entry

This is next step in cleaning up the struct service_entry.

Instead having a back link in struct service_entry to
service_entry use a global hash table which maps service_entries
to sessions.

This is an intermediate step to cleanup the session.c
file. Instead of doing everything in one big step we do baby steps.
That means also we need to keep stuff working in the steps. That's
the reason we add the global hash table and remove it later again.

Currently the only place we need this information is when we destroy
the entry.
session: Move service_entry to struct connman_session

Split the configuration of the session and the selected service.

The session configuration is tracked in struct session_info and
the selected service for given configuration is tracked in
struct service_entry. (Yes, struct service_entry will die, just
wait until we are there).

The struct service_entry is now directly a member of
struct connman_session.

While we are at let's get rid of some helper functions
and move the functionality (a one line) up to the caller function.
service: Add getter for service state

Currently session.c tracks the state of the service via the
notify API. Instead tracking the state and caching this
information, let's add a getter for retrieving this information
when needed.
session: Use service state getter

Since we can ask for the service state, let's drop the 'state'
member in struct service_entry.
service: Remove state argument from service_iterator_cb()

We have now a service state getter and we do not need to pass
in the state.
session: Remove connect reason from struct service_entry

The reason code is not used at all. We might need to add it
later to service.c but right now there is no point in keeping
it.
session: Remove struct service_entry

The struct service_entry contains now only the pointer a service.
There is no need to keep this pointer in a separate data structure
instead we are allowed to use pointers directly (via session->service
and session->service_last).
pacrunner: Let ConnMan autostart PACrunner when doing proxy lookup

If ConnMan needs help from PACrunner in finding the correct proxy
to use when doing the online check, allow PACrunner to be activated
via D-Bus.
service: Proxy should be reset when disconnecting

Fixes an issue where WPAD is started only at first connection, not after
a disconnection: it takes for granted the previous proxy setting which
is bogus (since last wpad url has be nuked)
gweb: Properly proceed a request through a proxy when one is set

This fixes a logical bug in gweb, as for a given host: if a proxy
address is provided it should resolv its DNS through g_resolv and not
getaddrinfo: g_resolv will then use the nameservers that have been set
to the g_web session.

Indirectly, this fixes a bug when ConnMan was always staying at ready
when service was proxied, even though such proxy would allow to go on
internet.
wispr: Get the proper proxy address from the result

It has to strip away the "PROXY" word and spaces from the proxy lookup
result, or then gweb won't be able to resolve it.