Fixed a bug with creation of redundant http connections.

Fixed a bug with creation of redundant http connections. Created multithreaded test that allows to run language detection in many threads and check available connections in pool.