detect if the database has got some datas. return true if
all jGuard tables involved in authorization are empty
(i.e jg_app_principal,jg_permission,jg_domain).
Remove the permission from all principals that have relationship with this permission like a
orphaned permission (directly), or through a domain (indirectly).