Deep-water cycling and the Magmatic History of the Earth