QGo: Scalable Quantum Circuit Optimization Using Automated Synthesis