Fixed CWE-476 in creating tag group.

When node wasn’t found, then data thread was blocked.
Fixed CWE-561 (dead code) in client udp connect.
Fixed CWE-561 in client tcp connect code.
Refactoring and fixed CWE-125 in reading csv file.
Fixed CWE-125 in processing system commands.
Fixed another CWE-125 bugs and refactoring.