Automating Quantum Software Maintenance: Flakiness Detection and Root Cause Analysis