1470 reduce user tables querying

@Kartones CR this, please. Dashboard tables/visualization request does half database queries with this changes, and some of them are at model level, so some improvement should be transversal. Most of changes are for avoiding double computations, and I think they're safe, but maybe you see something I shouldn't do.
mm why sending the permission here? table.table_visualization is the canonical visualization, and if that is nil we don't add the permission. But if we add it, it is always the canonical visualization permission, never the one from visualization (the one from to_poro's visualization object).