[lib] Refactor ENSCache lambdas a little bit
Summary:
This code had some many-to-many branching behavior, so I had previously defined a lambda to avoid code duplication.
In this diff I swap the lambda vs. main function body parts, as this will be beneficial for the following diffs. Arguably it reads cleaner this way anyways if you're familiar with the async IIFE pattern.
Depends on D6428
Test Plan: cd lib && ALCHEMY_API_KEY=... yarn test utils/ens-cache.test.js
Reviewers: atul
Reviewed By: atul
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D6429