Hierarchical Agglomerative Clustering on Graphs in Nearly Linear Time