Merge pull request #273 from rxin/top

Fixed a performance problem in RDD.top and BoundedPriorityQueue

BoundedPriority was actually traversing the entire queue to calculate the size, resulting in bad performance in insertion.

This should also cherry pick cleanly into branch-0.8.

(cherry picked from commit f4effb375e93993be1777ebb423c100ea8422f24)
Signed-off-by: Reynold Xin <rxin@apache.org>