Complex balancing in general kinetic systems