Continental magmatism, volatile recycling, and a heterogeneous mantle caused by lithospheric gravitational instabilities