Separate graph representation from search algorithm.

They were already pretty separate, representation mostly needed renaming.
Also put them is separate files.  This is in preparation for other search
algorithms on the same graph representation.