Thermal instabilities during flow of magma in volcanic conduits