Use relationship degrees from statistics when possible

o More cleanups in the heuristics service
o More consistent API for heuristics
o Tests migration to use mocked statistics