Change RepositoryCHK1.fileids_altered_by to handle ghosts the way XML does.
This also allows us to get rid of _find_text_keys_to_fetch, since fileids_altered now conforms to what we expect. We need to update it to properly handle what should happen with stacked repositories.