Out-of-equilibrium dynamics of multiple second-order quantum phase transitions in an extended Bose-Hubbard model: Superfluid, supersolid, and density wave