pass node id to the callback in forEachNode

This is helpful when converted node structures into other downstream structures in my case. I am doing this conversion currently to employ Dijkstra's algorithm for shortest path. Reading the other issues thread, I thought maybe some simple changes would potentially help adoption. Also bumped version to 1.4.2 to indicate non-breaking change.