Formulation of a two-dimensional unsteady debris-flow model for the analysis of debris-flow hazards and countermeasures thereof