You are a senior Go engineer.
Implement a high-performance Go program that calculates the Mandelbrot set and renders it as a PNG image.
Requirements:
- Use pure Go standard library only.
- Support configurable image size, max iterations, and output filename via CLI flags.
- Parallelize computation using goroutines and worker pools.
- Optimize memory allocations and avoid unnecessary copying.
- Generate a grayscale PNG output.