Optimal Goal-Reaching Reinforcement Learning via Quasimetric Learning