An arm length stabilization system for KAGRA and future gravitational-wave detectors