Variational path-integral theory of quantum crystals