On the topology of T-duality for torus bundles