Rename small-graph and trivial-graph to use underscores.

Also, refactor their graph generation into functions.
Add .gitignore.
Fix bug in YenKSP.
Invert weights in small_graph.
Add flow computation.