General rules for the arrangements and gating motions of pore-lining helices in homomeric ion channels