TS-1475: fix memory leak in SDK_API_TSTextLog test

Coverity CID 1022157
TS-1475: ensure that SDK_API_TSMimeHdrParse buffers are released

Coverity CID 1022156