XS: Fix broken `RemoveHandler` implementation in the Path extension

Previous code will never remove event handlers because because lambdas aren't comparable.
Merge pull request #383 from rojepp/path_extension_eventfix

XS: Fix broken `RemoveHandler` implementation in the Path extension