fixed a bug in igraph_density that resulted in incorrect values for undirected graphs with loops