java_gen/DataPathId: make comparable

Reviewer: @vaterlaus