Quiver varieties and Kac-Moody algebras