I'm not sure exactly,but In my opinion that こと is thing.
For example.
君が好きだ = I love to you.
君のことが好きだ = I love for thing about you.
I think こと include for everthing.
If I say 君のことが好きだ,that means I don't love limited to just you,I love all things about you.which include your background,family,personality,figure and so on.that's everthing around you.
Ofcouse you can say 君が好きだ,but 君のことが好きだ is more emotional expression.