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

Closes #831 aka lp 1322191
[FIX] event onchange event type

Courtesy of Alejandro Santana

Closes: #1046, #1047
Merge remote-tracking branch 'odoo/7.0' into 7.0