Analytical Solution of the Classical Dam-Break Problem for the Gravity Wave–Model Equations