[tcpclient] added reconnect functionality;
[apiclient] make use of reconnect;
[apiserver] proper shutdown;