The Topology of Causality