Negative definite kernels and a dynamical characterization of property (T) for countable groups