Support basic next/image loading (#2481)
This implements basic support for serving the images requested by `next/image` and `next/future/image`. The big missing features are:
- image width resizing (and thus blurry image placeholders)
- image quality encoding
- format re-encoding
This required a lot more work than I expected, because we have to also override the `remotePatterns` to allow using `next/image` with remote images. The only way I found to do this was to override the `__NEXT_IMAGE_OPTS` env var, which is a special object value injected by webpack's `DefinePlugin` as if it were an `process.env` value.
Fixes https://github.com/vercel/web-tooling-internal/issues/5
Porting from https://github.com/vercel/the-three-body/pull/212
Fixes WEB-150
Fixes WEB-2