Vibrational echo studies of pure dephasing: Mechanisms in liquids and glasses