Before this PR, the presence service was relying on window events
blur/focus to determine whether or not odoo was focused. The issue is
that in the website backend, an iframe is used. When this iframe is focused,
the window looses the focus and vice versa.
This commit fixes this issue by using `window.parent.hasFocus` method.
task-3003950
closesodoo/odoo#102518
X-original-commit: ce57d4494f2bc6a1504f8a7bddddca2a3d2b794b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>