Refactor a bit projectile-project-files

The name of the function was confusing since it was not actually
computing the project files for a while now, so it got renamed to
`projectile-dir-files`. A couple of helper functions were also extracted
from it.