[FIX] mail: set the parent_id to the first message of type email

And fallback of any type if there is none of type email

This fix allow the communication between two mail thread from two different Odoo servers having message creation subtypes, like project issue or crm lead
Merge branch '7.0' of https://github.com/odoo/odoo into 7.0-linux64