Two-phase dynamics of volcanic eruptions: compaction, compression and the conditions for choking