Topological terms and anomaly matching in effective field theories on ℝ3 × 𝕊1. Part I. Abelian symmetries and intermediate scales