TS-2555: fix TSMBuffer and TSMLoc allocation problem for client request in ts_lua plugin