authz: fix broken `UserIDsWithOldestPerms` when user is hard-deleted
Created by: unknwon
Instead of checking if user is not in the list of soft-deleted, we now check the user is not deleted.
This prevents scheduler trying to sync permissions for hard-deleted users. Such scenario is not usual (DB is manually modified).
Similar fix to #11770