Make search function generic

* Provide 4 types to determine how to expand nodes
* Implement bfs, dfs
* Define OpenSet interface, and provide implementations
* Clean up