Fixes modify_group SQL and rewrites is_cat_visible's

According the design of table: user, group, user_group, I think is_cat_visible should work after joining with user_groups table, and `gid` field in user table should be useless...