Michael Gove said David Cameron "deserves to be remembered as a great prime minister" as he joined Boris Johnson in paying tribute to the outgoing PM.