* Get rid of many memory leaks, because I finaly get rid of OpenSSL
memory leaks. It is neccessary to compile OpenSSL library with -DPURIFY
flag
* Data thread is joined corectly.

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>