Changed `is_valid()` and `validate()` to class methods
Change how layer caching works

Instead of overwriting `self._layerdata`, it is now in effect only if iterating with `is_filtered=True`. `is_filtered=False` is supposed to mean "all layers", not "all cached layers".