socket close JS callback improvement

Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
clean up JS

Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
improve onSocketConnected() callback

Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
implement unregister service handler

Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>