Whispering‐gallery modes of nonuniform dielectric resonators