Inverse Statistical Mechanics, Lattice Packings, and Glasses