Optimize page permissions checking

  * group__users doesn't exist and it wasn't select_related
  * group__user_set is a one to many, we should use prefetch_related
  * has_permission_membership was still running even if has_perm was
    True