Approximate solution of the classical Liouville equation using Gaussian phase packet dynamics: Application to enhanced equilibrium averaging and global optimization