pdns: Kill all spawned processes

Pipe backend spawned processes can still be alive after the pdns_server-instance was killed.
If the children remain alive, sockets will not be released, and the pdns_server-instance can't be respawned.

To be sure that all the spawned processes are killed, we must kill by using the process GID.
To be able to do the soft reloads, pdns_server-instance is declared as process group lider.

Also, all forced kills must kill by GID, not by PID, so all the processes would properly die.

Signed-off-by: Igor Maravic <igor@spotify.com>
Signed-off-by: Alexey Lapitsky <alexey@spotify.com>
Clean up after DynListener crash

When DynListener crashes, kill all processes from his parent PGRP.

This way we'll certanly close the pdns.controlsocket (no more hanging pdns_control processes)
and we'll kill the processes that aren't managable via pdns_control any more.
Add timeout to pdns_control connect, send and recv calls

If any of the connect, send and recv calls are timedout, TimeoutException is thrown.
main loop catches that exception and returns code 2.
code 1 is returned for all other exceptions.

In init.d script we now have 3 states:
UP
DOWN
UNRESPONSIVE

If the pdns_server is unresponsive, it will be killed.
After that, script continues as usual.
Clean up after the pdns_server-instance

Make sure that all children are killed after the pdns_server-instance dies
PDNS should always be the leader of the process group

That way, we can properly kill all of it's subprocesses!
Merge branch 'master' of https://github.com/i-maravic/pdns into i-maravic-master