Dynamics of tissue topology during cancer invasion and metastasis