Lightning Framework Fake Pull Request

I made this PR to myself so that Ioan/Mark can add comments inline if desired.
Here, you copy the pointers from newPathSegment, but not the actual states. When newPathSegment goes out of scope, the copied pointers in states will be invalid.