read-cache.c: refactor --ignore-missing implementation