[IMP] registry: add method get_cursor() to simply retrieve a new cursor, and refactor code to use it bzr revid: rco@openerp.com-20140408125122-ki0zmin3m21k2itd