Spontaneous decay in the presence of dispersing and absorbing bodies: General theory and application to a spherical cavity | Synapse