Add method BucketGrid#getDistanceToCellEdge

This will be used to optimize searching
Add wrapper comparator (TopicDistanceComparator)