Fancy API

I changed the API of `distance` to `distance(A, B, get_children, insert_cost, remove_cost, update_cost)` and wrote a wrapper `simple_distance()` that matches the old API. I made the bare minimum of documentation updates because I plan to make one more documentation pass.

I wrote two new simple test cases. You may wish to write another one and otherwise verify my changes for correctness.