X-GM-THRID support (copied X-GM-MSGID extension)
fixed memory leaks
Merge remote-tracking branch 'alltom/master'
Fixed X-GM-THRID and X-GM-MSGID.