Support for searching X-GM-THRID

Needed support for this in MailCore, so I went ahead and added this.  I think I got all the cases where this needs to be changed, but please let me know if I missed or need to change something, thanks!