Moved mark/unmark text methods to CachedConnection in kom.py because we want to invalidate its  textstat cache.