Quiver varieties and Hall algebras