fix(next/image): handle empty buffer and experimental flag for `skipMetadata` (#82569)
As a follow up to PR https://github.com/vercel/next.js/pull/82538 this
PR adds an experimental flag to optionally skip `sharp.metadata()` and
rely only on the JS implementation for format detection.