Add private BFS implementation for SAP
Make fDistTo return faster but having it emit the answer directly

fDistTo now has two different types of return values depending on the
value of the sum parameter. This is a very bad idea and I will likely
replace it.
Rewrite SAP implementation by using a cache private data type