feat(image-optimizer): use previously cached image cache entry if upstream image is identical (#67257)
### What?
- Reduces redundant image optimizations if the upstream image is
unchanged, there is no need to run the optimization again as you can
just use the previously optimized image.
- Changes `getHash`-function to return `base64url` instead of custom
variant of standard `base64`. This can be removed if deemed not
necessary.
- Moves all image ETag calculation logic (and introduce
`getImageEtag`-function to do it) to happen inside `image-optimizer` for
better consistency.
### Why?
Currently when an image is requested and it becomes stale, the server
will trigger a full image optimization for that image, using a
significant spike in CPU-usage for routes that have multiple images
(e.g. an image carousel).
### How?
By calculating and storing the upstream etag in the cache entry, we can
utilize the previously cached entry to check if the upstream image has
remained the same, making it possible to reuse the previously cached
entry again, as the image optimization would produce the same results
anyways.
---------
Co-authored-by: Steven <steven@ceriously.com>