getdeps: memoize eden prefetched dirs
getdeps: memoize eden prefetched dirs

Summary:
currently, the implementation of `eden prefetch` calls into
a mercurial function that is overly eager in making network connections,
which results in what should be a fast NOP second prefetch call taking
more time than is desirable.

This diff adds a little cache to avoid repeatedly calling prefetch
for the same directory more than once for the life of the getdeps
process.

Given the usage pattern of getdeps it is OK that we don't provide
a way to invalidate this cache.

Reviewed By: fanzeyi

Differential Revision: D18005408

fbshipit-source-id: 0ec3f477da1043a5a715704b512c81fcfaa0acde

rsocket/rsocket-cpp,rsocket/rsocket-cpp,rsocket/rsocket-cpp,ReactiveSocket/reactivesocket-cpp,ReactiveSocket/reactivesocket-cpp,ReactiveSocket/reactivesocket-cpp,rsocket/rsocket-cpp