DirectoryIndexer: Remove incorrect assumption on object types
process_journal_objects can in theory be called from a journal client which consumes other object types too, so there may be other objects, and 'directory' may be missing entirely.
This isn't an issue in practice though, because DirectoryIndexer is only used indirectly.
Migrated from D8043 (view on Phabricator)