XWIKI-9182: The "Delete Space" feature does not work if a space is marked as "hidden"
* Optimize performances so that only query is executed against the database