Spin-dependent quantum transport in periodic magnetic modulations: Aharonov–Bohm ring structure as a spin filter