[FIX] bus : notification should be committed before awake longtpolling thread
[FIX] bus : notification should be committed before awake longtpolling thread

If calling more than once `sendmany` (or `sendone`) on the same http request, the `NOTIFY imbus` will tell pertinent polling thread to
fetch their notifications in the bus table, which will not contain the new notifications, since they are not yet committed. For some reason, this
doesn't happen when calling only once `sendmany`. Committing the notifications breaks the tests since no rollback is possible.
So, `self._cr.commit()` should not be called in a test environement.

In this case, we cannot use `isinstance(self._cr, TestCursor)` since TestCursor is only avaiblable for http request in test mode. Here the cursor is a normal cursor, and to determine if we are in test mode, there is no other option than checking the config of the odoo server.

optima-ict/odoo,dfang/odoo,Elico-Corp/odoo_OCB,bplancher/odoo,ygol/odoo,hip-odoo/odoo,sysadminmatmoz/OCB,hip-odoo/odoo,dfang/odoo,laslabs/odoo,sysadminmatmoz/OCB,storm-computers/odoo,dfang/odoo,microcom/odoo,stephen144/odoo,microcom/odoo,ygol/odoo,syci/OCB,storm-computers/odoo,optima-ict/odoo,stephen144/odoo,bplancher/odoo,hip-odoo/odoo,microcom/odoo,storm-computers/odoo,ygol/odoo,Elico-Corp/odoo_OCB,Elico-Corp/odoo_OCB,sysadminmatmoz/OCB,sysadminmatmoz/OCB,laslabs/odoo,hip-odoo/odoo,laslabs/odoo,syci/OCB,sysadminmatmoz/OCB,optima-ict/odoo,sysadminmatmoz/OCB,Elico-Corp/odoo_OCB,ygol/odoo,sysadminmatmoz/OCB,microcom/odoo,laslabs/odoo,bplancher/odoo,bplancher/odoo,syci/OCB,optima-ict/odoo,Elico-Corp/odoo_OCB,hip-odoo/odoo,stephen144/odoo,optima-ict/odoo,bplancher/odoo,ygol/odoo,optima-ict/odoo,storm-computers/odoo,syci/OCB,stephen144/odoo,stephen144/odoo,ygol/odoo,bplancher/odoo,dfang/odoo,Elico-Corp/odoo_OCB,syci/OCB,ygol/odoo,dfang/odoo,laslabs/odoo,dfang/odoo,storm-computers/odoo,hip-odoo/odoo,microcom/odoo,stephen144/odoo,syci/OCB,laslabs/odoo,microcom/odoo,storm-computers/odoo