Add thread

Will replace #28.

Waiting for https://github.com/cinemast/libjson-rpc-cpp/pull/56.
Is this update intentional?