Better at knowing what get-dependencies calls have been memoized

It turns out that #1162 wasn't that helpful because the project
argument keeps changing. This new version makes the real worker get a
filtered version of project, so that memoization hits are much more
likely.
Merge pull request #1164 from ryfow/rememoize-get-dependencies

Better at knowing what get-dependencies calls have been memoized