X-ray flares from runaway pair production in active galactic nuclei