Modelling the cosmological co-evolution of supermassive black holes and galaxies – I. BH scaling relations and the AGN luminosity function