Fixes linear_conflict and uses in A* heuristic

The previous implementation of `linear_conflict` was under-reporting due to a faulty implementation. It now returns the real pair distance of a given grid as expected. It could use a little refactoring, though — the code that calculates the real pair distance of each row is nearly identical to that which does the same for each column.

Now that `linear_conflict` functions correctly, I have added it with `manhattan_distance` as the heuristic for A*. This "Manhattan pair distance" heuristic remains admissable, but is a far more accurate guess of the minimum number of moves required to reach the goal state.
Adds test for #linear_conflict