Mixing of stratified liquids by the motion of gas bubbles: application to magma mixing