fixed a bug in pagerank primitive.
update pr functor. todo:complete dangling nodes removal.