[FIX] sql_db: close db connexions before removing them.

Closes #831 aka lp 1322191
Merge branch '7.0' of https://github.com/odoo/odoo into 7.0-linux64