Added block to sort_by_ancestry method for sorting within rank.

Hi! I added block to sort_by_ancestry for custom sorting. 
Example: Node.sort_by_ancestry(Node.all) {|a, b| a.position <=> b.position}