[#7009] cache icon resource resolution instead of icon urls, so http/https doesn't get wrongly cached

Resource lookup is the slow part (although not that slow), so just
cache that.  And encapsulate via the @memoize decorator.