Revert "LPS-45013 Don't create the set if we don't need to"

This reverts commit fa7fa99beb67f2a5ee98bb5e62bedd5b1b84bf04.
Revert "LPS-45013 Revert changes in SearchPermissionCheckerImpl.java. Let's keep this simple and just use the fix in ResourcePermissionLocalServicImpl that gets rid of the use of the inefficient sql"

This reverts commit e675e71e8539ab9f7bd944d4eefd035be418c061.
Revert "LPS-45013 Excessively long content creation times when a high number of roles is in the Portal"

This reverts commit 93d3aa005a62e31272633d93cb6229172c6dc845.