[FIX] mail: performance in find_partner_from_email
[FIX] mail: performance in find_partner_from_email

This is a backport of commit 3d32e9966500290f35e6edfebf97b9a60a1fc495 done
in 9 and ported to the old API. The purpose is to avoid searching on
the res.partner table with a domain leaf being user_ids != False. Indeed
this search is costly. Use a direct search on the user table instead.

microcom/odoo,laslabs/odoo,datenbetrieb/odoo,sergio-incaser/odoo,eino-makitalo/odoo,makinacorpus/odoo,jiangzhixiao/odoo,spadae22/odoo,diagramsoftware/odoo,Elico-Corp/odoo_OCB,hip-odoo/odoo,provaleks/o8,OpenUpgrade/OpenUpgrade,MarcosCommunity/odoo,Daniel-CA/odoo,BT-rmartin/odoo,dfang/odoo,ehirt/odoo,makinacorpus/odoo,hip-odoo/odoo,Noviat/odoo,jiangzhixiao/odoo,odootr/odoo,markeTIC/OCB,odootr/odoo,Adel-Magebinary/odoo,laslabs/odoo,glovebx/odoo,factorlibre/OCB,Endika/OpenUpgrade,BT-rmartin/odoo,leorochael/odoo,datenbetrieb/odoo,draugiskisprendimai/odoo,markeTIC/OCB,Nowheresly/odoo,storm-computers/odoo,vnsofthe/odoo,microcom/odoo,alexcuellar/odoo,jiangzhixiao/odoo,diagramsoftware/odoo,bplancher/odoo,ehirt/odoo,jfpla/odoo,makinacorpus/odoo,Nowheresly/odoo,BT-rmartin/odoo,markeTIC/OCB,leorochael/odoo,rubencabrera/odoo,OpenUpgrade/OpenUpgrade,sergio-incaser/odoo,stephen144/odoo,funkring/fdoo,hip-odoo/odoo,tvibliani/odoo,NeovaHealth/odoo,CatsAndDogsbvba/odoo,vnsofthe/odoo,provaleks/o8,hip-odoo/odoo,jfpla/odoo,draugiskisprendimai/odoo,jiangzhixiao/odoo,ehirt/odoo,sergio-incaser/odoo,mustafat/odoo-1,Elico-Corp/odoo_OCB,vnsofthe/odoo,BT-ojossen/odoo,glovebx/odoo,hassoon3/odoo,odootr/odoo,OpenUpgrade/OpenUpgrade,draugiskisprendimai/odoo,Endika/odoo,rubencabrera/odoo,rubencabrera/odoo,MarcosCommunity/odoo,Endika/odoo,ehirt/odoo,factorlibre/OCB,MarcosCommunity/odoo,Daniel-CA/odoo,markeTIC/OCB,makinacorpus/odoo,dfang/odoo,provaleks/o8,storm-computers/odoo,Adel-Magebinary/odoo,sysadminmatmoz/OCB,NeovaHealth/odoo,spadae22/odoo,tvibliani/odoo,jfpla/odoo,mustafat/odoo-1,leorochael/odoo,synconics/odoo,diagramsoftware/odoo,datenbetrieb/odoo,tvibliani/odoo,vnsofthe/odoo,ygol/odoo,Antiun/odoo,sysadminmatmoz/OCB,dfang/odoo,microcom/odoo,spadae22/odoo,mustafat/odoo-1,MarcosCommunity/odoo,CatsAndDogsbvba/odoo,synconics/odoo,odootr/odoo,storm-computers/odoo,MarcosCommunity/odoo,bplancher/odoo,CatsAndDogsbvba/odoo,eino-makitalo/odoo,grap/OpenUpgrade,synconics/odoo,eino-makitalo/odoo,mustafat/odoo-1,Antiun/odoo,storm-computers/odoo,Antiun/odoo,stephen144/odoo,hassoon3/odoo,Antiun/odoo,hip-odoo/odoo,draugiskisprendimai/odoo,hip-odoo/odoo,NeovaHealth/odoo,tvibliani/odoo,provaleks/o8,leorochael/odoo,jiangzhixiao/odoo,Elico-Corp/odoo_OCB,odootr/odoo,shingonoide/odoo,sysadminmatmoz/OCB,Endika/odoo,eino-makitalo/odoo,odootr/odoo,Elico-Corp/odoo_OCB,provaleks/o8,storm-computers/odoo,datenbetrieb/odoo,ygol/odoo,OpenUpgrade/OpenUpgrade,spadae22/odoo,vnsofthe/odoo,OpenUpgrade/OpenUpgrade,Daniel-CA/odoo,laslabs/odoo,mustafat/odoo-1,microcom/odoo,dfang/odoo,grap/OpenUpgrade,provaleks/o8,Nowheresly/odoo,rubencabrera/odoo,alexcuellar/odoo,spadae22/odoo,BT-ojossen/odoo,Adel-Magebinary/odoo,Antiun/odoo,Daniel-CA/odoo,funkring/fdoo,ygol/odoo,provaleks/o8,jiangzhixiao/odoo,OpenUpgrade/OpenUpgrade,factorlibre/OCB,BT-rmartin/odoo,Adel-Magebinary/odoo,Antiun/odoo,synconics/odoo,factorlibre/OCB,sergio-incaser/odoo,NeovaHealth/odoo,dfang/odoo,BT-rmartin/odoo,sergio-incaser/odoo,datenbetrieb/odoo,Noviat/odoo,funkring/fdoo,shingonoide/odoo,makinacorpus/odoo,Antiun/odoo,Elico-Corp/odoo_OCB,alexcuellar/odoo,glovebx/odoo,diagramsoftware/odoo,grap/OpenUpgrade,MarcosCommunity/odoo,Adel-Magebinary/odoo,alexcuellar/odoo,stephen144/odoo,synconics/odoo,spadae22/odoo,Endika/odoo,microcom/odoo,spadae22/odoo,laslabs/odoo,Endika/odoo,Noviat/odoo,stephen144/odoo,Endika/OpenUpgrade,Daniel-CA/odoo,storm-computers/odoo,Noviat/odoo,BT-ojossen/odoo,rubencabrera/odoo,alexcuellar/odoo,funkring/fdoo,shingonoide/odoo,jfpla/odoo,ehirt/odoo,tvibliani/odoo,grap/OpenUpgrade,CatsAndDogsbvba/odoo,hassoon3/odoo,sysadminmatmoz/OCB,Nowheresly/odoo,leorochael/odoo,leorochael/odoo,shingonoide/odoo,draugiskisprendimai/odoo,diagramsoftware/odoo,Nowheresly/odoo,stephen144/odoo,BT-ojossen/odoo,diagramsoftware/odoo,laslabs/odoo,jfpla/odoo,glovebx/odoo,rubencabrera/odoo,mustafat/odoo-1,datenbetrieb/odoo,BT-rmartin/odoo,Nowheresly/odoo,factorlibre/OCB,eino-makitalo/odoo,odootr/odoo,shingonoide/odoo,alexcuellar/odoo,CatsAndDogsbvba/odoo,draugiskisprendimai/odoo,mustafat/odoo-1,BT-rmartin/odoo,funkring/fdoo,CatsAndDogsbvba/odoo,sysadminmatmoz/OCB,laslabs/odoo,MarcosCommunity/odoo,rubencabrera/odoo,Endika/OpenUpgrade,Endika/OpenUpgrade,markeTIC/OCB,MarcosCommunity/odoo,NeovaHealth/odoo,BT-ojossen/odoo,Elico-Corp/odoo_OCB,Daniel-CA/odoo,Endika/odoo,grap/OpenUpgrade,ygol/odoo,Endika/OpenUpgrade,glovebx/odoo,NeovaHealth/odoo,leorochael/odoo,synconics/odoo,NeovaHealth/odoo,funkring/fdoo,vnsofthe/odoo,hassoon3/odoo,jfpla/odoo,bplancher/odoo,hassoon3/odoo,ehirt/odoo,jiangzhixiao/odoo,markeTIC/OCB,BT-ojossen/odoo,jfpla/odoo,glovebx/odoo,ygol/odoo,ygol/odoo,Adel-Magebinary/odoo,alexcuellar/odoo,diagramsoftware/odoo,bplancher/odoo,bplancher/odoo,makinacorpus/odoo,Daniel-CA/odoo,CatsAndDogsbvba/odoo,grap/OpenUpgrade,BT-ojossen/odoo,funkring/fdoo,Noviat/odoo,factorlibre/OCB,Noviat/odoo,ygol/odoo,makinacorpus/odoo,Endika/odoo,shingonoide/odoo,tvibliani/odoo,tvibliani/odoo,hassoon3/odoo,glovebx/odoo,microcom/odoo,sergio-incaser/odoo,stephen144/odoo,factorlibre/OCB,Endika/OpenUpgrade,Endika/OpenUpgrade,synconics/odoo,ehirt/odoo,grap/OpenUpgrade,eino-makitalo/odoo,eino-makitalo/odoo,datenbetrieb/odoo,bplancher/odoo,Nowheresly/odoo,dfang/odoo,draugiskisprendimai/odoo,sysadminmatmoz/OCB,vnsofthe/odoo,OpenUpgrade/OpenUpgrade,Noviat/odoo,markeTIC/OCB,Adel-Magebinary/odoo,shingonoide/odoo,sysadminmatmoz/OCB