The structural and dynamical properties of compact elliptical galaxies