[lib] Allow getNamesForAddresses to be called without ReverseRecords smart contract
Summary:
The ReverseRecords smart contract is deployed on mainnet and on Goerli, but not on Sepolia.
As a result, we can no longer use it from our unit tests, which have to be moved from Goerli to Sepolia.
To make getNamesForAddresses still work for the unit tests, I added a fallback that just does multiple single-record lookups.
More details on alternatives I considered in part 3 of this task description.
Depends on D11486
Test Plan:
In combination with the next diff, I manually ran ALCHEMY_API_KEY=key yarn test utils/ens-cache.test.js and confirmed no errors resulted
Note that Buildkite CI doesn't run this particular test because we never built the plumbing to have the ALCHEMY_API_KEY accessible from there. GitHub Actions CI does run this test
Reviewers: atul, ginsu
Reviewed By: ginsu
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D11487