[FIX] mail: when checking for possible messages to fetch, perform
a search_count on mail_message when the actual number of messages or their
ids is not necessary, to speedup the computation.
[FIX] [IMP] mail: mail_message: when checking that access rights are not
violated in _search, do it in SQL to speedup the query. Indeed doing it via search and
browsing the results to validate the various rules is quite costly.
[REVERT] commit 5e5c73e

Branch 8.0 is a **stable** branch. This mean no database schema
changes.
Merge branch '8.0' of https://github.com/odoo/odoo into 8.0-win32