KernelClient: factor out generic threaded client from Qt client