Remove contains_any() function

Function was checking whether a string contains characters from a given set.
This functionanlity can be achived easily with built-in any(). I replace
the occurences of contains_any() with appropriate construct.