Add support for passing expanded selectors to various PathLikeSelector methods, fix max_levels memoization by using serialization of nonhashable (expanded) selectors.