Optimizes ++ in DistMaps slightly.
Adds changes missing from commit a0be398.
Further refactors comonalities of various inference algos: they now share a common explore function to shallowly (with look-ahead 1) explore the search tree.
Trivial cleanups.