FlashRecovery: Fast and Low-Cost Recovery from Failures for Large-Scale Training of LLMs