Eliminates the segfault reported in tickets #10924, #11043, #11378.
It changes the parent of the polling socket from the LoggerThread to the
polling context.  As a result, the polling socket is not deleted when the
LoggerThread is deleted and the destroyed signal is never triggered preventing
the call to disconnect() the deleted polling socket from the polling context.