Optical sum rules and effective-medium theories for a polycrystalline material: Application to a model for polypyrrole.