[server] refactor cleanup() code used by "cubicweb-ctl delete"
Try to make each logical step (i.e. "delete database" and "delete user")
a bit more visible and explicit.
This is a preparatory work to easily plug the "delete namespace" feature.
Document: cubicweb-doc
Title: CubicWeb documentation
Author: Logilab
Abstract: Some base documentation for CubicWeb users and developpers
Section: Apps/Programming
Format: HTML
Index: /usr/share/doc/cubicweb-documentation/index.html
Files: /usr/share/doc/cubicweb-documentation/*.html