chore(image-optimizer): cleanup unused code paths, refactor opts (#73373)
- cleanup unused code paths since `optimizedBuffer` and `upstreamBuffer`
are always defined
- refactor additional options in to `opts` object
- add `opts.silent` option to disable logs
This is easiest to review with whitespace disabled:
https://github.com/vercel/next.js/pull/73373/files?diff=split&w=1