Lie coalgebras and rational homotopy theory, I: graph coalgebras