Service discovery fixed

Transition between being online and offline is now handled properly.
The main reason nothing worked as expected was deffered call when
trying to resolve service parameters multiple times.  The timer
responsible for scheduling another try needed to be cached and reused
(for unknown reason, honestly).

This commit also includes better handling of the situation when
there's no service found so that request queue is cleared faster and
we don't have to wait more than 15 second for every call in the queue
to be resolved.  This is done by caching empty service discovery tries
for couple of (configurable) seconds.