libctd: Split main into two parts

The plan is to make one session per daemon, thus
no fork()-s will be in the future.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libctd: Rewrite using one session per daemon

Now one daemon serves one local session. All connectors
work within one. Though local session is not thread safe,
daemon serves requests one by one (epolls all fds) and
thus it's safe -- each call is "atomic".

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
libct: Add ability to open existing ct handle by name

TODO: uniqueness of the ct's and names.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>