Theoretical Models for Classical Cepheids. VIII. Effects of Helium and Heavy-Element Abundance on the Cepheid Distance Scale