[REF] Use the contextlib.closing function instead of a couple of try/catch for
the release of the database cursor.
Merge branch 'master' of bzr::lp:openobject-server