Kinetic or thermal AGN feedback in simulations of isolated and merging disc galaxies calibrated by the M-  relation