res.user: optimize _get_interface_type() to use a straight SQL query
res.user: optimize _get_interface_type() to use a straight SQL query

Since this call will be used often for views, it's better to make it
as fast as possible.

xrg/openerp-server,xrg/openerp-server