Family gauge symmetry as an origin of Koide's mass formula and charged lepton spectrum