Topology change in classical and quantum gravity