For the scenarios where both `Filter` and `Map` are being applied,
having this util should be faster, as it avoids the creation of an extra
slice during the intermediate step.
Having a `slices.Contains` check within a `for` loop has a complexity of
`O(n*m)`, with a worst case scenario of `O(n^2)` for when both
collections have the same size.
This is because `slices.Contains` internally runs just a regular loop,
checking for equality element by element.
Instead, this diff changes every occurence of this pattern to converting
the collection we compare against to a set, and then running a faster
lookup against it.
Upgrade to 1.21 as 1.20 is now unmaintained.
Most changes are related to the new `slices` package from standard
library, which can replace some existing custom functions.