Gauge-theoretic invariants for topological insulators: a bridge between Berry, Wess–Zumino, and Fu–Kane–Mele