Changed the way keys_of_max_values behaves, fixing some bugs.

Bugs fixed:
  * LPA crashing on a graph containing a node with degree 0.
  * LabelRank sometimes producing unlabeled nodes.