The cosmological co-evolution of supermassive black holes, AGN and galaxies