Add lifetime bounds to the path-finding structs

The caller can still specify the `'static` bound if they wish the closure to
escape the stack frame, but this lets us use the by-ref closures as well.
Merge pull request #35 from tomassedovic/non-static-closures

Add lifetime bounds to the path-finding structs