Casimir energy for a spherical cavity in a dielectric: Applications to sonoluminescence