Sloshing of a bubbly magma reservoir as a mechanism of triggered eruptions