Two-Way Quantum Codes with Optimal Erasure Resilience